Ejemplo n.º 1
0
        public override void Update()
        {
            base.Update();

            if (!Locked)
            {
                PlayerInteractor playerInteractor = Scene.Tracker.GetComponent <PlayerInteractor>();
                if (playerInteractor.Check(this))
                {
                    Engine.Scene = NextScene;
                }
            }
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
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();
            }
        }