コード例 #1
0
ファイル: Entity.cs プロジェクト: hh-pg-math/Memoria
        public virtual bool Attack(AttackType attack)
        {
            if (target != null && !target.IsAlive())
            {
                return(true);
            }

            if (charge)
            {
                orderIndex = attack.phaseCost;
                tracker.QueueAction(this, orderIndex);
                BattleMgr.Instance.SetState(State.RUNNING);
                return(true);
            }
            attackTimer++;

            if (attackTimer > attack.AttackTime)
            {
                attackTimer = 0;
                attackReady = true;
                DealDamage(attack);
                return(true);
            }
            return(false);
        }