Esempio n. 1
0
 protected override void Init()
 {
     base.Init();
     canTransitionInto = new StateMachine.States[]
     {
         StateMachine.States.Idle
     };
 }
Esempio n. 2
0
 protected override void Init()
 {
     base.Init();
     canTransitionInto = new StateMachine.States[]
     {
         //StateMachine.States.FightOrFlight, //will need this eventually for insta-deaths
         //StateMachine.States.Incapacitated
     };
 }
Esempio n. 3
0
 protected override void Init()
 {
     base.Init();
     canTransitionInto = new StateMachine.States[]
     {
         StateMachine.States.Idle,
         StateMachine.States.Incapacitated,
         StateMachine.States.PlayerMove
     };
 }
Esempio n. 4
0
        public override void Check <T>()
        {
            if (Input.GetMouseButton(0))
            {
                Ray        ray = Camera.ScreenPointToRay(Input.mousePosition);
                RaycastHit raycast;
                Physics.Raycast(ray, out raycast, 10f, Layer);
                Debug.DrawLine(ray.origin, ray.origin + 10 * ray.direction.normalized, Color.yellow);
                if (raycast.collider != null)
                {
                    MouseHoverComponent mouseHoverComponent = raycast.collider.gameObject.GetComponent <MouseHoverComponent>();
                    if (mouseHoverComponent)
                    {
                        if (mouseHoverComponent.GetComponent <T>())
                        {
                            if (currentTarget && currentTarget != mouseHoverComponent)
                            {
                                Release();
                            }
                        }

                        currentTarget = mouseHoverComponent;
                        currentTarget.IsOnPressHover = true;
                    }
                    else
                    {
                        if (currentTarget)
                        {
                            Release();
                        }
                    }
                }
                else
                {
                    if (currentTarget)
                    {
                        Release();
                    }
                }
            }
            else
            {
                if (currentTarget)
                {
                    Release();
                }

                StateMachine.States curState = Instance.M_StateMachine.GetState();
                if (StateMachine.InGameState.Contains(curState) && curState != StateMachine.States.SelectCardWindow_ReadOnly)
                {
                    Instance.M_StateMachine.SetState(StateMachine.States.BattleNormal);
                }
            }
        }
Esempio n. 5
0
 protected override void Init()
 {
     base.Init();
     canTransitionInto = new StateMachine.States[]
     {
         StateMachine.States.Idle,
         StateMachine.States.Fight,
         StateMachine.States.Flight,
         StateMachine.States.Incapacitated
     };
 }
Esempio n. 6
0
 protected override void Init()
 {
     base.Init();
     canTransitionInto = new StateMachine.States[]
     {
         StateMachine.States.Idle,
         //this is in case we are attacked while inventory is open
         StateMachine.States.Incapacitated,
         StateMachine.States.Dead
     };
 }
Esempio n. 7
0
    protected override void Init()
    {
        base.Init();
        usm = (UnitStateMachine)stateMachine;

        canTransitionInto = new StateMachine.States[]
        {
            StateMachine.States.Idle,
            StateMachine.States.Incapacitated,
            StateMachine.States.Routed
        };
    }
Esempio n. 8
0
 protected override void Init()
 {
     base.Init();
     canTransitionInto = new StateMachine.States[]
     {
         StateMachine.States.Idle,
         StateMachine.States.Incapacitated,
         StateMachine.States.FightOrFlight, //in case we are attacked
         StateMachine.States.Prompted,
         StateMachine.States.Dead
     };
 }
Esempio n. 9
0
 protected override void Init()
 {
     base.Init();
     canTransitionInto = new StateMachine.States[]
     {
         StateMachine.States.Idle,
         StateMachine.States.FightOrFlight,
         StateMachine.States.Incapacitated,
         StateMachine.States.PlayerMove,
         StateMachine.States.InvOpen,
         StateMachine.States.BattleReportOpen,
         StateMachine.States.Paused
     };
 }
Esempio n. 10
0
 //should split this class up to shorten this array
 protected override void Init()
 {
     base.Init();
     canTransitionInto = new StateMachine.States[]
     {
         StateMachine.States.FightOrFlight,
         StateMachine.States.Incapacitated,
         StateMachine.States.PlayerMove,
         StateMachine.States.InvOpen,
         StateMachine.States.Paused,
         StateMachine.States.Talking,
         StateMachine.States.Shopping,
         StateMachine.States.Harvesting
     };
 }
Esempio n. 11
0
 protected override void Init()
 {
     base.Init();
     canTransitionInto = new StateMachine.States[]
     {
         StateMachine.States.Idle,
         StateMachine.States.Talking,
         StateMachine.States.Incapacitated,
         StateMachine.States.InvOpen,
         StateMachine.States.PlayerMove,
         //StateMachine.States.FightOrFlight, //we don't want the player to automatically react to attacks
         StateMachine.States.Paused,
         StateMachine.States.Fight,
         StateMachine.States.Flight,
         StateMachine.States.Dead,
         StateMachine.States.Shopping,
         StateMachine.States.Harvesting
     };
 }