Example #1
0
        public override void Destroy()
        {
            base.Destroy();

            Dialog.Close(() => { Dialog.Done = true; });
            Engine.Instance.Window.TextInput -= HandleInput;

            if (Talking == this)
            {
                Talking = null;
            }
        }
Example #2
0
        public void OnEnd()
        {
            if (To != null)
            {
                if (To.TryGetComponent <PlayerInputComponent>(out var input))
                {
                    input.InDialog   = false;
                    input.Dialog     = null;
                    Dialog.ShowArrow = false;
                }

                To.GetComponent <HealthComponent>().Unhittable = wasUnhittable;
                wasUnhittable = false;
            }

            Tween.To(1, Camera.Instance.TextureZoom, x => Camera.Instance.TextureZoom = x, 0.3f, Ease.QuadInOut);
            ((InGameState)Engine.Instance.State).CloseBlackBars();

            Talking = null;
        }
Example #3
0
        private void OnStart()
        {
            var p = (Player)To;

            if (p.TryGetComponent <PlayerInputComponent>(out var input))
            {
                input.InDialog   = true;
                input.Dialog     = this;
                Dialog.ShowArrow = true;
            }

            var health = To.GetComponent <HealthComponent>();

            wasUnhittable     = health.Unhittable;
            health.Unhittable = true;

            Tween.To(2, Camera.Instance.TextureZoom, x => Camera.Instance.TextureZoom = x, 0.3f, Ease.QuadInOut);

            p.GetComponent <StateComponent>().Become <Player.IdleState>();
            ((InGameState)Engine.Instance.State).OpenBlackBars();

            Talking = this;
        }