pufferfish, started real map
This commit is contained in:
parent
53a746c551
commit
0a69b80b34
BIN
assets/img/enemies/pufferFish.aseprite
Normal file
BIN
assets/img/enemies/pufferFish.aseprite
Normal file
Binary file not shown.
50
assets/img/enemies/pufferFishAttack.json
Normal file
50
assets/img/enemies/pufferFishAttack.json
Normal file
@ -0,0 +1,50 @@
|
||||
{ "frames": {
|
||||
"pufferFish 0.aseprite": {
|
||||
"frame": { "x": 0, "y": 0, "w": 39, "h": 25 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 39, "h": 25 },
|
||||
"sourceSize": { "w": 39, "h": 25 },
|
||||
"duration": 100
|
||||
},
|
||||
"pufferFish 1.aseprite": {
|
||||
"frame": { "x": 39, "y": 0, "w": 39, "h": 25 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 39, "h": 25 },
|
||||
"sourceSize": { "w": 39, "h": 25 },
|
||||
"duration": 100
|
||||
},
|
||||
"pufferFish 2.aseprite": {
|
||||
"frame": { "x": 78, "y": 0, "w": 39, "h": 25 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 39, "h": 25 },
|
||||
"sourceSize": { "w": 39, "h": 25 },
|
||||
"duration": 100
|
||||
},
|
||||
"pufferFish 3.aseprite": {
|
||||
"frame": { "x": 117, "y": 0, "w": 39, "h": 25 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 39, "h": 25 },
|
||||
"sourceSize": { "w": 39, "h": 25 },
|
||||
"duration": 100
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"app": "http://www.aseprite.org/",
|
||||
"version": "1.2.27-x64",
|
||||
"image": "pufferFishAttack.png",
|
||||
"format": "RGBA8888",
|
||||
"size": { "w": 156, "h": 25 },
|
||||
"scale": "1",
|
||||
"frameTags": [
|
||||
],
|
||||
"layers": [
|
||||
{ "name": "Layer 1", "opacity": 255, "blendMode": "normal" }
|
||||
],
|
||||
"slices": [
|
||||
]
|
||||
}
|
||||
}
|
BIN
assets/img/enemies/pufferFishAttack.png
Normal file
BIN
assets/img/enemies/pufferFishAttack.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 974 B |
42
assets/img/enemies/pufferFishBigIdle.json
Normal file
42
assets/img/enemies/pufferFishBigIdle.json
Normal file
@ -0,0 +1,42 @@
|
||||
{ "frames": {
|
||||
"pufferFish 0.aseprite": {
|
||||
"frame": { "x": 0, "y": 0, "w": 19, "h": 19 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 19, "h": 19 },
|
||||
"sourceSize": { "w": 19, "h": 19 },
|
||||
"duration": 100
|
||||
},
|
||||
"pufferFish 1.aseprite": {
|
||||
"frame": { "x": 19, "y": 0, "w": 19, "h": 19 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 19, "h": 19 },
|
||||
"sourceSize": { "w": 19, "h": 19 },
|
||||
"duration": 100
|
||||
},
|
||||
"pufferFish 2.aseprite": {
|
||||
"frame": { "x": 38, "y": 0, "w": 19, "h": 19 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 19, "h": 19 },
|
||||
"sourceSize": { "w": 19, "h": 19 },
|
||||
"duration": 100
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"app": "http://www.aseprite.org/",
|
||||
"version": "1.2.27-x64",
|
||||
"image": "pufferFishBigIdle.png",
|
||||
"format": "RGBA8888",
|
||||
"size": { "w": 57, "h": 19 },
|
||||
"scale": "1",
|
||||
"frameTags": [
|
||||
],
|
||||
"layers": [
|
||||
{ "name": "Layer 1", "opacity": 255, "blendMode": "normal" }
|
||||
],
|
||||
"slices": [
|
||||
]
|
||||
}
|
||||
}
|
BIN
assets/img/enemies/pufferFishBigIdle.png
Normal file
BIN
assets/img/enemies/pufferFishBigIdle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 587 B |
50
assets/img/enemies/pufferFishExpand.json
Normal file
50
assets/img/enemies/pufferFishExpand.json
Normal file
@ -0,0 +1,50 @@
|
||||
{ "frames": {
|
||||
"pufferFish 0.aseprite": {
|
||||
"frame": { "x": 0, "y": 0, "w": 19, "h": 19 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 19, "h": 19 },
|
||||
"sourceSize": { "w": 19, "h": 19 },
|
||||
"duration": 100
|
||||
},
|
||||
"pufferFish 1.aseprite": {
|
||||
"frame": { "x": 19, "y": 0, "w": 19, "h": 19 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 19, "h": 19 },
|
||||
"sourceSize": { "w": 19, "h": 19 },
|
||||
"duration": 100
|
||||
},
|
||||
"pufferFish 2.aseprite": {
|
||||
"frame": { "x": 38, "y": 0, "w": 19, "h": 19 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 19, "h": 19 },
|
||||
"sourceSize": { "w": 19, "h": 19 },
|
||||
"duration": 100
|
||||
},
|
||||
"pufferFish 3.aseprite": {
|
||||
"frame": { "x": 57, "y": 0, "w": 19, "h": 19 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 19, "h": 19 },
|
||||
"sourceSize": { "w": 19, "h": 19 },
|
||||
"duration": 100
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"app": "http://www.aseprite.org/",
|
||||
"version": "1.2.27-x64",
|
||||
"image": "pufferFishExpand.png",
|
||||
"format": "RGBA8888",
|
||||
"size": { "w": 76, "h": 19 },
|
||||
"scale": "1",
|
||||
"frameTags": [
|
||||
],
|
||||
"layers": [
|
||||
{ "name": "Layer 1", "opacity": 255, "blendMode": "normal" }
|
||||
],
|
||||
"slices": [
|
||||
]
|
||||
}
|
||||
}
|
BIN
assets/img/enemies/pufferFishExpand.png
Normal file
BIN
assets/img/enemies/pufferFishExpand.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 768 B |
66
assets/img/enemies/pufferFishIdle.json
Normal file
66
assets/img/enemies/pufferFishIdle.json
Normal file
@ -0,0 +1,66 @@
|
||||
{ "frames": {
|
||||
"pufferFish 0.aseprite": {
|
||||
"frame": { "x": 0, "y": 0, "w": 19, "h": 19 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 19, "h": 19 },
|
||||
"sourceSize": { "w": 19, "h": 19 },
|
||||
"duration": 100
|
||||
},
|
||||
"pufferFish 1.aseprite": {
|
||||
"frame": { "x": 19, "y": 0, "w": 19, "h": 19 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 19, "h": 19 },
|
||||
"sourceSize": { "w": 19, "h": 19 },
|
||||
"duration": 100
|
||||
},
|
||||
"pufferFish 2.aseprite": {
|
||||
"frame": { "x": 38, "y": 0, "w": 19, "h": 19 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 19, "h": 19 },
|
||||
"sourceSize": { "w": 19, "h": 19 },
|
||||
"duration": 100
|
||||
},
|
||||
"pufferFish 3.aseprite": {
|
||||
"frame": { "x": 57, "y": 0, "w": 19, "h": 19 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 19, "h": 19 },
|
||||
"sourceSize": { "w": 19, "h": 19 },
|
||||
"duration": 100
|
||||
},
|
||||
"pufferFish 4.aseprite": {
|
||||
"frame": { "x": 76, "y": 0, "w": 19, "h": 19 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 19, "h": 19 },
|
||||
"sourceSize": { "w": 19, "h": 19 },
|
||||
"duration": 100
|
||||
},
|
||||
"pufferFish 5.aseprite": {
|
||||
"frame": { "x": 95, "y": 0, "w": 19, "h": 19 },
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": { "x": 0, "y": 0, "w": 19, "h": 19 },
|
||||
"sourceSize": { "w": 19, "h": 19 },
|
||||
"duration": 100
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"app": "http://www.aseprite.org/",
|
||||
"version": "1.2.27-x64",
|
||||
"image": "pufferFish.png",
|
||||
"format": "RGBA8888",
|
||||
"size": { "w": 114, "h": 19 },
|
||||
"scale": "1",
|
||||
"frameTags": [
|
||||
],
|
||||
"layers": [
|
||||
{ "name": "Layer 1", "opacity": 255, "blendMode": "normal" }
|
||||
],
|
||||
"slices": [
|
||||
]
|
||||
}
|
||||
}
|
BIN
assets/img/enemies/pufferFishIdle.png
Normal file
BIN
assets/img/enemies/pufferFishIdle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 420 B |
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 292 KiB After Width: | Height: | Size: 323 KiB |
File diff suppressed because one or more lines are too long
@ -323,7 +323,7 @@ impl Screen for InGameScreen {
|
||||
.world
|
||||
.end_position
|
||||
.distance_to(game_core.player.position)
|
||||
<= 70.0
|
||||
<= 40.0
|
||||
{
|
||||
return Some(GameState::WinGame);
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ pub fn update_player_movement(
|
||||
) {
|
||||
// Calculate DT
|
||||
let dt = draw_handle.get_time() - game_core.last_frame_time;
|
||||
|
||||
|
||||
// Handle player movement
|
||||
let mouse_pose = draw_handle.get_mouse_position();
|
||||
let mouse_world_pose = draw_handle.get_screen_to_world2D(mouse_pose, game_core.master_camera);
|
||||
@ -80,6 +80,7 @@ pub fn update_player_movement(
|
||||
game_core
|
||||
.player
|
||||
.begin_attack(&mut game_core.world, draw_handle.get_time());
|
||||
println!("{{\"x\":{}, \"y\":{}}},",f32::round(game_core.player.position.x),f32::round(game_core.player.position.y));
|
||||
}
|
||||
|
||||
// Move the player in their direction
|
||||
|
Reference in New Issue
Block a user