public override void Update() { base.Update(); if (!Locked) { PlayerInteractor playerInteractor = Scene.Tracker.GetComponent <PlayerInteractor>(); if (playerInteractor.Check(this)) { Engine.Scene = NextScene; } } }
public Player(Vector2 pos) : base(pos) { Collider = new Hitbox(Sprite.Width, Sprite.Height, -Sprite.Width / 2, -Sprite.Height / 2); PlayerInteractor = new PlayerInteractor(new Vector2(Position.X, Position.Y + 16)); // State Machine StateMachine.State = StNormal; CurHealth = BaseHealth; Add(Sprite); Add(PlayerInteractor); Depth = 0; }
public override void Update() { base.Update(); if (Scene != null && !Activated) { PlayerInteractor playerInteractor = Scene.Tracker.GetComponent <PlayerInteractor>(); if (playerInteractor != null) { if (playerInteractor.Check(Entity)) { StartDialogue(); } } } if (Activated) { dialogueCoroutine.Update(); } }