#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/scripts/actions/water_plant.gd
Normal file
8
entities/interactables/scripts/actions/water_plant.gd
Normal file
@@ -0,0 +1,8 @@
|
||||
extends InteractableAction
|
||||
class_name WaterPlantAction
|
||||
|
||||
func action(_p: Player, _i : Interactable):
|
||||
if _i is Plant:
|
||||
_i.watered = true
|
||||
else :
|
||||
printerr("No plant selected or interactable is not a plant")
|
||||
@@ -0,0 +1 @@
|
||||
uid://bb38yqsd072ws
|
||||
Reference in New Issue
Block a user