void StartAttack(SoulMonster monster) { startAttack = true; attackingTimer = 0; procedureOwner.Owner.transform.LookAt(monster.transform); procedureOwner.Owner.PlayAnimation("Attack00"); attackingMonster = monster; }
void TryAttack() { SoulMonster monster = GameMgr.Instance.GetPlayerAttackTarget(); if (monster == null) { ChangeState <IdleState>(procedureOwner); } else { StartAttack(monster); } }
public void OnMonsterDeath(SoulMonster monster) { if (monsters.Contains(monster)) { monsters.Remove(monster); } if (wave >= monsterCountPerTimes.Length && monsters.Count == 0) { isWinner = true; ChangeState(GameState.End); } }
void AttackOver() { startAttack = false; AIUtility.OnDamage(attackingMonster, procedureOwner.Owner); attackingMonster = null; }
protected override void OnLeave(IFsm <IPlayer> procedureOwner, bool isShutdown) { EasyJoystick.On_JoystickMove -= OnJoystickMove; this.procedureOwner = null; attackingMonster = null; }