Large refactoring. Also, reimplemented resource manager to use parsers. Changed from json to xml (it allows comments!!!).
This commit is contained in:
4
assets/config/Default.config
Normal file
4
assets/config/Default.config
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Configuration>
|
||||
<animationFps>60</animationFps>
|
||||
</Configuration>
|
15
assets/items/lvl1_sword.item
Normal file
15
assets/items/lvl1_sword.item
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"name" : "Level 1 Sword",
|
||||
"description" : "Most basic sword.",
|
||||
"enemyDamage" : 3,
|
||||
"attackDuration" : 10,
|
||||
"criticalProbability" : 0.01,
|
||||
|
||||
"level" : 1,
|
||||
|
||||
"tool" : true,
|
||||
"giftable" : false,
|
||||
"sellable" : false,
|
||||
|
||||
"sprite" : "sprites/items/lvl1_sword.sprite"
|
||||
}
|
16
assets/items/stone_pickaxe.item
Normal file
16
assets/items/stone_pickaxe.item
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"name" : "Stone pickaxe",
|
||||
"description" : "The most basic type of pickaxe. It can break small stones.",
|
||||
"enemyDamage" : 1,
|
||||
"criticalProbability" : 0,
|
||||
|
||||
"level" : 1,
|
||||
|
||||
"tool" : true,
|
||||
"giftable" : false,
|
||||
"sellable" : false,
|
||||
|
||||
"sprite" : "sprites/items/stone_pickaxe.sprite",
|
||||
|
||||
"controller" : "PickaxeItem"
|
||||
}
|
8
assets/levels/Farm.back
Normal file
8
assets/levels/Farm.back
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Background columns="380" rows="213">
|
||||
|
||||
<Layer name="Background"
|
||||
cells="levels/Farm_Background.csv"
|
||||
texture="tilesets/Ground.png" />
|
||||
|
||||
</Background>
|
@ -1,17 +0,0 @@
|
||||
{
|
||||
"cellWidth": 16,
|
||||
"cellHeight": 16,
|
||||
|
||||
"layerCount" : 1,
|
||||
"width" : 380,
|
||||
"height" : 213,
|
||||
|
||||
"layers":
|
||||
[
|
||||
{
|
||||
"name" : "Background",
|
||||
"cellsFile" : "levels/Farm_Background.csv",
|
||||
"textureFile" : "tilesets/Ground.png"
|
||||
}
|
||||
]
|
||||
}
|
29
assets/scenes/Game.scene
Normal file
29
assets/scenes/Game.scene
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Scene cellWidth="16"
|
||||
cellHeight="16">
|
||||
|
||||
<!-- Main camera -->
|
||||
<GameObject name="Main Camera">
|
||||
<Transform />
|
||||
<Camera scale="4" mainCamera="true" />
|
||||
</GameObject>
|
||||
|
||||
<!-- Background object -->
|
||||
<GameObject name="Background">
|
||||
<Background src="levels/Farm.back" />
|
||||
<BackgroundRenderer />
|
||||
</GameObject>
|
||||
|
||||
<!-- Player object -->
|
||||
<GameObject name="Player">
|
||||
<Transform x="120" y="100" />
|
||||
<SpriteRenderer sprite="sprites/Player.sprite" />
|
||||
<PlayerController />
|
||||
</GameObject>
|
||||
|
||||
<!-- Debug object -->
|
||||
<GameObject name="Debug">
|
||||
<DebugController />
|
||||
</GameObject>
|
||||
|
||||
</Scene>
|
41
assets/sprites/Player.sprite
Normal file
41
assets/sprites/Player.sprite
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Sprite name="Player"
|
||||
anchorX="0.5" anchorY="1">
|
||||
|
||||
<State name="Idle right">
|
||||
<Frame tileSet="tilesets/PlayerTiles.png" cell="0" w="1" h="2" duration="1" />
|
||||
</State>
|
||||
|
||||
<State name="Idle up">
|
||||
<Frame tileSet="tilesets/PlayerTiles.png" cell="2" w="1" h="2" duration="1" />
|
||||
</State>
|
||||
|
||||
<State name="Idle left">
|
||||
<Frame tileSet="tilesets/PlayerTiles.png" cell="4" w="1" h="2" duration="1" />
|
||||
</State>
|
||||
|
||||
<State name="Idle down">
|
||||
<Frame tileSet="tilesets/PlayerTiles.png" cell="6" w="1" h="2" duration="1" />
|
||||
</State>
|
||||
|
||||
<State name="Walking right">
|
||||
<Frame tileSet="tilesets/PlayerTiles.png" cell="0" w="1" h="2" duration="7" />
|
||||
<Frame tileSet="tilesets/PlayerTiles.png" cell="1" w="1" h="2" duration="7" />
|
||||
</State>
|
||||
|
||||
<State name="Walking up">
|
||||
<Frame tileSet="tilesets/PlayerTiles.png" cell="2" w="1" h="2" duration="7" />
|
||||
<Frame tileSet="tilesets/PlayerTiles.png" cell="3" w="1" h="2" duration="7" />
|
||||
</State>
|
||||
|
||||
<State name="Walking left">
|
||||
<Frame tileSet="tilesets/PlayerTiles.png" cell="4" w="1" h="2" duration="7" />
|
||||
<Frame tileSet="tilesets/PlayerTiles.png" cell="5" w="1" h="2" duration="7" />
|
||||
</State>
|
||||
|
||||
<State name="Walking down">
|
||||
<Frame tileSet="tilesets/PlayerTiles.png" cell="6" w="1" h="2" duration="7" />
|
||||
<Frame tileSet="tilesets/PlayerTiles.png" cell="7" w="1" h="2" duration="7" />
|
||||
</State>
|
||||
|
||||
</Sprite>
|
36
assets/sprites/items/lvl1_sword.sprite
Normal file
36
assets/sprites/items/lvl1_sword.sprite
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"name" : "Level 1 sword",
|
||||
"anchorX" : 0,
|
||||
"anchorY" : 1,
|
||||
|
||||
"states" :
|
||||
[
|
||||
{
|
||||
"name" : "Normal",
|
||||
"frames" :
|
||||
[
|
||||
{
|
||||
"tileSet" : "tilesets/PlayerTiles.png",
|
||||
"cell" : 0,
|
||||
"width" : 1,
|
||||
"height" : 2,
|
||||
"duration" : 1
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name" : " Attack",
|
||||
"frames" :
|
||||
[
|
||||
{
|
||||
"tileSet" : "tilesets/PlayerTiles.png",
|
||||
"cell" : 2,
|
||||
"width" : 1,
|
||||
"height" : 2,
|
||||
"duration" : 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
36
assets/sprites/items/stone_pickaxe.sprite
Normal file
36
assets/sprites/items/stone_pickaxe.sprite
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"name" : "Stone pickaxe",
|
||||
"anchorX" : 0,
|
||||
"anchorY" : 1,
|
||||
|
||||
"states" :
|
||||
[
|
||||
{
|
||||
"name" : "Normal",
|
||||
"frames" :
|
||||
[
|
||||
{
|
||||
"tileSet" : "tilesets/PlayerTiles.png",
|
||||
"cell" : 0,
|
||||
"width" : 1,
|
||||
"height" : 2,
|
||||
"duration" : 1
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name" : "Attack",
|
||||
"frames" :
|
||||
[
|
||||
{
|
||||
"tileSet" : "tilesets/PlayerTiles.png",
|
||||
"cell" : 2,
|
||||
"width" : 1,
|
||||
"height" : 2,
|
||||
"duration" : 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -1,148 +0,0 @@
|
||||
{
|
||||
"name" : "Player",
|
||||
"anchorX" : 0.5,
|
||||
"anchorY" : 1,
|
||||
|
||||
"states" :
|
||||
[
|
||||
{
|
||||
"name" : "Idle right",
|
||||
"frames" :
|
||||
[
|
||||
{
|
||||
"tileSet" : "tilesets/PlayerTiles.png",
|
||||
"cell" : 0,
|
||||
"width" : 1,
|
||||
"height" : 2,
|
||||
"duration" : 1
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name" : "Idle up",
|
||||
"frames" :
|
||||
[
|
||||
{
|
||||
"tileSet" : "tilesets/PlayerTiles.png",
|
||||
"cell" : 2,
|
||||
"width" : 1,
|
||||
"height" : 2,
|
||||
"duration" : 1
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name" : "Idle left",
|
||||
"frames" :
|
||||
[
|
||||
{
|
||||
"tileSet" : "tilesets/PlayerTiles.png",
|
||||
"cell" : 4,
|
||||
"width" : 1,
|
||||
"height" : 2,
|
||||
"duration" : 1
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name" : "Idle down",
|
||||
"frames" :
|
||||
[
|
||||
{
|
||||
"tileSet" : "tilesets/PlayerTiles.png",
|
||||
"cell" : 6,
|
||||
"width" : 1,
|
||||
"height" : 2,
|
||||
"duration" : 1
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name" : "Walking right",
|
||||
"frames" :
|
||||
[
|
||||
{
|
||||
"tileSet" : "tilesets/PlayerTiles.png",
|
||||
"cell" : 0,
|
||||
"width" : 1,
|
||||
"height" : 2,
|
||||
"duration" : 7
|
||||
},
|
||||
{
|
||||
"tileSet" : "tilesets/PlayerTiles.png",
|
||||
"cell" : 1,
|
||||
"width" : 1,
|
||||
"height" : 2,
|
||||
"duration" : 7
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name" : "Walking up",
|
||||
"frames" :
|
||||
[
|
||||
{
|
||||
"tileSet" : "tilesets/PlayerTiles.png",
|
||||
"cell" : 2,
|
||||
"width" : 1,
|
||||
"height" : 2,
|
||||
"duration" : 7
|
||||
},
|
||||
{
|
||||
"tileSet" : "tilesets/PlayerTiles.png",
|
||||
"cell" : 3,
|
||||
"width" : 1,
|
||||
"height" : 2,
|
||||
"duration" : 7
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name" : "Walking left",
|
||||
"frames" :
|
||||
[
|
||||
{
|
||||
"tileSet" : "tilesets/PlayerTiles.png",
|
||||
"cell" : 4,
|
||||
"width" : 1,
|
||||
"height" : 2,
|
||||
"duration" : 7
|
||||
},
|
||||
{
|
||||
"tileSet" : "tilesets/PlayerTiles.png",
|
||||
"cell" : 5,
|
||||
"width" : 1,
|
||||
"height" : 2,
|
||||
"duration" : 7
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name" : "Walking down",
|
||||
"frames" :
|
||||
[
|
||||
{
|
||||
"tileSet" : "tilesets/PlayerTiles.png",
|
||||
"cell" : 6,
|
||||
"width" : 1,
|
||||
"height" : 2,
|
||||
"duration" : 7
|
||||
},
|
||||
{
|
||||
"tileSet" : "tilesets/PlayerTiles.png",
|
||||
"cell" : 7,
|
||||
"width" : 1,
|
||||
"height" : 2,
|
||||
"duration" : 7
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
BIN
assets/ui/mini_inventory.png
Normal file
BIN
assets/ui/mini_inventory.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 237 B |
Reference in New Issue
Block a user