示例#1
0
 void StartAttack(SoulMonster monster)
 {
     startAttack    = true;
     attackingTimer = 0;
     procedureOwner.Owner.transform.LookAt(monster.transform);
     procedureOwner.Owner.PlayAnimation("Attack00");
     attackingMonster = monster;
 }
示例#2
0
        void TryAttack()
        {
            SoulMonster monster = GameMgr.Instance.GetPlayerAttackTarget();

            if (monster == null)
            {
                ChangeState <IdleState>(procedureOwner);
            }
            else
            {
                StartAttack(monster);
            }
        }
示例#3
0
        public void OnMonsterDeath(SoulMonster monster)
        {
            if (monsters.Contains(monster))
            {
                monsters.Remove(monster);
            }

            if (wave >= monsterCountPerTimes.Length && monsters.Count == 0)
            {
                isWinner = true;
                ChangeState(GameState.End);
            }
        }
示例#4
0
 void AttackOver()
 {
     startAttack = false;
     AIUtility.OnDamage(attackingMonster, procedureOwner.Owner);
     attackingMonster = null;
 }
示例#5
0
 protected override void OnLeave(IFsm <IPlayer> procedureOwner, bool isShutdown)
 {
     EasyJoystick.On_JoystickMove -= OnJoystickMove;
     this.procedureOwner           = null;
     attackingMonster              = null;
 }