示例#1
0
文件: Door.cs 项目: aaronlws95/twog
        public override void Update()
        {
            base.Update();

            if (!Locked)
            {
                PlayerInteractor playerInteractor = Scene.Tracker.GetComponent <PlayerInteractor>();
                if (playerInteractor.Check(this))
                {
                    Engine.Scene = NextScene;
                }
            }
        }
示例#2
0
文件: Player.cs 项目: aaronlws95/twog
        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;
        }
示例#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();
            }
        }