diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2022-06-05 04:38:44 -0600 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2022-06-05 04:38:44 -0600 |
commit | e4423cc8490b7f5ec3449f568bf64e81f4d03248 (patch) | |
tree | 167f178e1197c21260f70eaffd0a3375742f3447 /src/entities/food/scripts/food_special.gd | |
parent | 36abc689d783774ce4f2d7b5a1bb621d8684be45 (diff) |
add more food types, refactored code and tidy up stuff
Diffstat (limited to 'src/entities/food/scripts/food_special.gd')
-rw-r--r-- | src/entities/food/scripts/food_special.gd | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/entities/food/scripts/food_special.gd b/src/entities/food/scripts/food_special.gd new file mode 100644 index 0000000..c2fde78 --- /dev/null +++ b/src/entities/food/scripts/food_special.gd @@ -0,0 +1,16 @@ +class_name FoodSpecial +extends Food + +enum Type { + BUNNY, + FROG, + TURTLE, + RAT +} + + +func _ready(): + texture[Type.BUNNY] = preload("res://entities/food/sprites/bunny.png") + texture[Type.FROG] = preload("res://entities/food/sprites/frog.png") + texture[Type.TURTLE] = preload("res://entities/food/sprites/turtle.png") + texture[Type.RAT] = preload("res://entities/food/sprites/rat.png") |