Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        m_currentState = m_enterState;

        if (!m_chaseTarget)
        {
            m_chaseTarget = GameObject.FindGameObjectWithTag("Player").transform;
        }

        m_mapManager = MapManager.instance;
    }
Esempio n. 2
0
    // Update is called once per frame
    void Update()
    {
        m_currentState.UpdateState();

        if (m_previousState != null && m_previousState != m_currentState)
        {
            Debug.Log("RedBlob state changed! " + m_previousState + " -> " + m_currentState);

            // Initiate start method
            m_currentState.StartState();
        }

        m_previousState = m_currentState;
    }
Esempio n. 3
0
    // Update is called once per frame
    void Update()
    {
        if (m_previousState != null && m_previousState != m_currentState)
        {
            Debug.Log("Coily state changed! " + m_previousState + " -> " + m_currentState);

            // Initiate start
            m_currentState.StartState();
        }

        m_currentState.UpdateState();

        m_previousState = m_currentState;
    }
Esempio n. 4
0
    // Use this for initialization
    void Start()
    {
        m_currentState = m_enterState;

        m_mapManager = MapManager.instance;
    }