本文整理匯總了C#中Attack.Execute方法的典型用法代碼示例。如果您正苦於以下問題:C# Attack.Execute方法的具體用法?C# Attack.Execute怎麽用?C# Attack.Execute使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Attack
的用法示例。
在下文中一共展示了Attack.Execute方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ExecuteMove
void ExecuteMove(Move move)
{
//Chooses attack from queue and executes it
//Debug.Log("Choosing attack from attack queue");
//Try and have this go through the list until it finds
//a viable attack, any non viable attacks are thrown away
if (_moveQueue[0].IsAttack)
{
_attackPrefab = (Attack)_moveQueue[0];
_moveQueue.RemoveAt(0);
_currentAttack = (Attack)Instantiate(_attackPrefab, this.gameObject.transform.position, Quaternion.identity);
_currentAttack.Execute(_fighterRef, this);
_moveListened = false;
}
//else if(_moveQueue[0].IsJump)
else
{
_movePrefab = _moveQueue[0];
_moveQueue.RemoveAt(0);
_movePrefab.Execute(_fighterRef, this);
_moveListened = false;
}
}