#10 gestion des interaction du joueur
- ajout d'une classe abstraite d'éléments interactifs : Interactables - ajout d'une classe abstraite d'actions d'éléments d'interactifs : InteractablesActions - ajout de la première classe d'action : WaterPlant - ajout d'une plante rudimentaire
This commit is contained in:
8
entities/interactables/plants/scripts/plant.gd
Normal file
8
entities/interactables/plants/scripts/plant.gd
Normal file
@@ -0,0 +1,8 @@
|
||||
extends Interactable
|
||||
class_name Plant
|
||||
|
||||
var watered : bool = false : set = set_watered
|
||||
|
||||
func set_watered(_watered):
|
||||
watered = _watered
|
||||
$AnimatedSprite2D.play("watered" if watered else "default")
|
||||
1
entities/interactables/plants/scripts/plant.gd.uid
Normal file
1
entities/interactables/plants/scripts/plant.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cega715smavh3
|
||||
Reference in New Issue
Block a user