本文整理汇总了C#中Attack.setMoveYAxis方法的典型用法代码示例。如果您正苦于以下问题:C# Attack.setMoveYAxis方法的具体用法?C# Attack.setMoveYAxis怎么用?C# Attack.setMoveYAxis使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Attack
的用法示例。
在下文中一共展示了Attack.setMoveYAxis方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Awake
public virtual void Awake()
{
agent = gameObject.GetComponent<NavMeshAgent>();
//Patrol instance START
points = new Vector3[patrolWaypoints.Length];
for(int i=0; i<patrolWaypoints.Length; i++ ){
if(!moveYAxis){
points[i] = new Vector3(patrolWaypoints[i].transform.position.x, transform.position.y, patrolWaypoints[i].transform.position.z);
}else{
points[i] = new Vector3(patrolWaypoints[i].transform.position.x, patrolWaypoints[i].transform.position.y, patrolWaypoints[i].transform.position.z);
}
}
if(points.Length == 1){
vectorIndex = 0;
}
//Patrol instance END
enemyStats = GetComponent<EnemyStats>();
enemyAttack = GetComponent<Attack>();
enemyAttack.setMoveYAxis(moveYAxis);
if(enemyStats.spriteObject != null){
enemyAnimator = enemyStats.spriteObject.GetComponent<Animator>();
hashAnimator = enemyStats.spriteObject.GetComponent<HashAnimatorUnit>();
}
}
示例2: Awake
public virtual void Awake()
{
enemyStats = GetComponent<EnemyStats>();
enemyAttack = GetComponent<Attack>();
enemyAttack.setMoveYAxis(moveYAxis);
enemyAttack.setMoveToAttack(false);
if(enemyStats.spriteObject != null){
enemyAnimator = enemyStats.spriteObject.GetComponent<Animator>();
hashAnimator = enemyStats.spriteObject.GetComponent<HashAnimatorUnit>();
}
}
示例3: Awake
void Awake()
{
navMeshAgent = GetComponent<NavMeshAgent>();
playerAttack = GetComponent<Attack>();
playerAttack.setMoveYAxis(moveYAxis);
playerStats = GetComponent<UnitStats>();
if(playerStats.spriteObject != null){
animator = playerStats.spriteObject.GetComponent<Animator>();
hashAnimatorUnit = playerStats.spriteObject.GetComponent<HashAnimatorUnit>();
}
}