Sprite is now a component we can place on anything to render it.

This commit is contained in:
Zed A. Shaw 2025-02-10 12:58:24 -05:00
parent 9c37960283
commit 6bca6d021e
8 changed files with 50 additions and 26 deletions

View file

@ -14,8 +14,8 @@
"player": {
},
"worldgen": {
"enemy_probability": 20,
"empty_room_probability": 10,
"device_probability": 20
"enemy_probability": 100,
"empty_room_probability": 0,
"device_probability": 0
}
}

View file

@ -13,7 +13,8 @@
},
{"_type": "Device",
"config": {"test": true},
"events": ["Events::GUI::STAIRS_DOWN"]}
"events": ["Events::GUI::STAIRS_DOWN"]},
{"_type": "Sprite", "name": "barrel"}
]
},
"STAIRS_UP": {
@ -29,7 +30,8 @@
},
{"_type": "Device",
"config": {"test": true},
"events": ["Events::GUI::STAIRS_UP"]}
"events": ["Events::GUI::STAIRS_UP"]},
{"_type": "Sprite", "name": "barrel"}
]
},
"SPIKE_TRAP": {
@ -44,7 +46,8 @@
},
{"_type": "Device",
"config": {"test": true},
"events": ["Events::GUI::TRAP"]}
"events": ["Events::GUI::TRAP"]},
{"_type": "Sprite", "name": "barrel"}
]
}
}

View file

@ -11,15 +11,29 @@
{"_type": "EnemyConfig", "hearing_distance": 5}
]
},
"KNIGHT": {
"components": [
{"_type": "Tile", "display": "\u088d",
"foreground": [131, 213, 238],
"background": [30, 20, 75]
},
{"_type": "Combat", "hp": 200, "damage": 15, "dead": false},
{"_type": "Motion", "dx": 0, "dy": 0, "random": false},
{"_type": "LightSource", "strength": 70, "radius": 2},
{"_type": "EnemyConfig", "hearing_distance": 5},
{"_type": "Sprite", "name": "armored_knight"}
]
},
"EVIL_EYE": {
"components": [
{"_type": "Tile", "display": "\u08ac",
"foreground": [75, 200, 125],
{"_type": "Tile", "display": "\u0758",
"foreground": [205, 164, 246],
"background": [30, 20, 75]
},
{"_type": "Combat", "hp": 100, "damage": 50, "dead": false},
{"_type": "Motion", "dx": 0, "dy": 0, "random": false},
{"_type": "EnemyConfig", "hearing_distance": 10}
{"_type": "EnemyConfig", "hearing_distance": 10},
{"_type": "Sprite", "name": "evil_eye"}
]
}
}

View file

@ -9,7 +9,8 @@
{"_type": "Tile", "display": "\u0f08",
"foreground": [24, 120, 189],
"background": [230,120, 120]
}
},
{"_type": "Sprite", "name": "barrel"}
]
},
"SWORD_RUSTY": {
@ -22,7 +23,8 @@
{"_type": "Tile", "display": "\u1e37",
"foreground": [24, 120, 189],
"background": [24, 120, 189]
}
},
{"_type": "Sprite", "name": "barrel"}
]
},
"SWORD_LIGHT_AND_FLAME": {
@ -36,7 +38,8 @@
"foreground": [24, 205, 210],
"background": [24, 205, 210]
},
{"_type": "Weapon", "damage": 30}
{"_type": "Weapon", "damage": 30},
{"_type": "Sprite", "name": "barrel"}
]
},
"CHEST_SMALL": {
@ -48,7 +51,8 @@
"foreground": [150, 100, 189],
"background": [150, 100, 189]
},
{"_type": "Loot", "amount": 10}
{"_type": "Loot", "amount": 10},
{"_type": "Sprite", "name": "barrel"}
],
"inventory_count": 1
},
@ -62,7 +66,8 @@
"foreground": [24, 205, 210],
"background": [24, 205, 210]
},
{"_type": "LightSource", "strength": 60, "radius": 1.8}
{"_type": "LightSource", "strength": 60, "radius": 1.8},
{"_type": "Sprite", "name": "barrel"}
]
},
"POTION_HEALING_SMALL": {
@ -75,7 +80,8 @@
"foreground": [255, 205, 189],
"background": [255, 205, 189]
},
{"_type": "Curative", "hp": 20}
{"_type": "Curative", "hp": 20},
{"_type": "Sprite", "name": "barrel"}
]
}
}