2024-07-02 20:43:55 -05:00
|
|
|
export default async function createPlayer(id) {
|
|
|
|
const player = {
|
|
|
|
Camera: {},
|
2024-07-02 22:42:56 -05:00
|
|
|
Collider: {
|
|
|
|
bodies: [
|
2024-07-03 16:13:14 -05:00
|
|
|
{
|
|
|
|
points: [
|
2024-07-25 16:39:05 -05:00
|
|
|
{x: -3.5, y: -3.5},
|
|
|
|
{x: 3.5, y: -3.5},
|
|
|
|
{x: 3.5, y: 3.5},
|
|
|
|
{x: -3.5, y: 3.5},
|
2024-07-03 16:13:14 -05:00
|
|
|
],
|
|
|
|
},
|
2024-07-02 22:42:56 -05:00
|
|
|
],
|
|
|
|
},
|
2024-07-02 20:43:55 -05:00
|
|
|
Controlled: {},
|
2024-07-24 09:28:35 -05:00
|
|
|
Direction: {},
|
2024-07-12 02:10:22 -05:00
|
|
|
Ecs: {path: ['homesteads', `${id}`].join('/')},
|
2024-07-02 20:43:55 -05:00
|
|
|
Emitter: {},
|
|
|
|
Forces: {},
|
|
|
|
Interacts: {},
|
2024-07-14 02:26:43 -05:00
|
|
|
Interlocutor: {},
|
2024-07-02 20:43:55 -05:00
|
|
|
Inventory: {
|
|
|
|
slots: {
|
|
|
|
1: {
|
|
|
|
qty: 100,
|
|
|
|
source: '/assets/potion/potion.json',
|
|
|
|
},
|
2024-07-25 11:00:25 -05:00
|
|
|
2: {
|
|
|
|
qty: 1,
|
|
|
|
source: '/assets/magic-swords/magic-swords.json',
|
|
|
|
},
|
2024-07-02 20:43:55 -05:00
|
|
|
},
|
|
|
|
},
|
|
|
|
Health: {health: 100},
|
2024-07-27 15:28:08 -05:00
|
|
|
Light: {brightness: 4},
|
2024-07-03 19:05:40 -05:00
|
|
|
Magnet: {strength: 24},
|
2024-07-03 21:57:07 -05:00
|
|
|
Player: {},
|
2024-07-23 15:06:32 -05:00
|
|
|
Position: {x: 128, y: 448},
|
2024-07-02 20:43:55 -05:00
|
|
|
Speed: {speed: 100},
|
|
|
|
Sound: {},
|
|
|
|
Sprite: {
|
2024-07-03 21:56:55 -05:00
|
|
|
anchorX: 0.5,
|
2024-07-21 19:24:29 -05:00
|
|
|
anchorY: 0.9,
|
2024-07-02 20:43:55 -05:00
|
|
|
animation: 'moving:down',
|
|
|
|
frame: 0,
|
|
|
|
source: '/assets/dude/dude.json',
|
|
|
|
speed: 0.115,
|
|
|
|
},
|
|
|
|
Ticking: {},
|
|
|
|
VisibleAabb: {},
|
|
|
|
Wielder: {
|
2024-07-25 15:31:44 -05:00
|
|
|
activeSlot: 1,
|
2024-07-02 20:43:55 -05:00
|
|
|
},
|
|
|
|
};
|
2024-07-21 01:37:40 -05:00
|
|
|
return player;
|
2024-07-02 20:43:55 -05:00
|
|
|
}
|
|
|
|
|