Пример #1
0
 private void Awake()
 {
     data           = this.GetComponent <SoldierDataModel>();
     mapPathFinding = this.GetComponent <MapPathFindingBehaviour>();
     InSightList    = new List <Enemy>();
     aniCon         = this.GetComponent <DirectionalAnimation>();
 }
 // Use this for initialization
 void Start()
 {
     m_moving  = GetComponent <MovingBehaviour>();
     m_phyChar = GetComponent <PhysicCharBehaviour>();
     m_pathFindingBehaviour = GetComponent <MapPathFindingBehaviour>();
     m_animCtrl             = GetComponent <CharAnimationController>();
 }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     m_fAngOff = 360f * Random.value;
     m_player  = GameObject.FindGameObjectWithTag("Player");
     m_moving  = GetComponent <MovingBehaviour>();
     m_phyChar = GetComponent <PhysicCharBehaviour>();
     m_pathFindingBehaviour = GetComponent <MapPathFindingBehaviour>();
     m_animCtrl             = GetComponent <CharAnimationController>();
 }
Пример #4
0
 private void PathComputed(MapPathFindingBehaviour source)
 {
     m_computeTime     = Mathf.RoundToInt((Time.realtimeSinceStartup - m_lastComputeTime) * 1000);
     m_lastComputeTime = Time.realtimeSinceStartup;
 }