Реализация интерактивного объекта
This commit is contained in:
parent
872d650b3d
commit
de683399fa
4 changed files with 94 additions and 70 deletions
|
@ -257,6 +257,11 @@ public partial class Player : CharacterBody2D
|
|||
_nextPosition = door.Exit.GlobalPosition;
|
||||
CurrentState = State.Wait;
|
||||
}
|
||||
|
||||
if (InteractableObject is Interactable obj)
|
||||
{
|
||||
obj.Interact();
|
||||
}
|
||||
}
|
||||
|
||||
if (@event.IsActionPressed("show_chat"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue