예제 #1
0
 void Start()
 {
     m_meshPivot     = this.gameObject.transform.GetChild(1);
     m_influenceMap  = GetComponent <InfluenceMap>();
     m_movement      = GetComponent <SeekerMovement>();
     m_fieldOfView   = GetComponent <FieldOfView>();
     m_viewAngle     = m_fieldOfView.m_viewAngle;
     m_lookAround    = 0;
     m_lookRightLeft = 0;
 }
예제 #2
0
    void Start()
    {
        Debug.Log("ENEMY: Start");
        // Instantiate gameManager prefab
        if (GameManager.manager == null)
        {
            Instantiate(m_gameManager);
        }

        m_currentState           = (int)State.Searching; // Searches by default
        m_fieldOfView            = GetComponent <FieldOfView>();
        m_originalSpotlightColor = m_spotlight.color;
        m_movement = GetComponent <SeekerMovement>();

        m_player = FindObjectOfType <Player>();
        m_target = m_player.transform;

        // TODO: Add check to see which child equals to the meshpivot
        m_meshPivot = this.gameObject.transform.GetChild(1);
    }
예제 #3
0
 void Start()
 {
     m_influenceMap = GetComponent <InfluenceMap>();
     m_mapSize      = m_influenceMap.GetSize();
     m_movement     = gameObject.GetComponent <SeekerMovement>();
 }
예제 #4
0
 private void Start()
 {
     movement = GetComponent <SeekerMovement>();
 }