示例#1
0
    // brief The ignition step, if a fire has just started in the cell set internal and Fire Visual Manager states. Ignition() should be
    // called rather then this method directly
    // param Vector3 Position
    // param GameObject Fire GameObject/Prefab
    public void Ignition(Vector3 position, GameObject Fire)
    {
        if (m_fireJustStarted)
        {
            m_isAlight = true;

            for (int i = 0; i < m_fires.Length; i++)
            {
                FireVisualManager visualMgr = m_fires[i].GetComponent <FireVisualManager>();
                visualMgr.SetIgnitionState();
            }
        }
    }
示例#2
0
    // brief The ingition step, will make the fuel within the cell become lit
    void Ingition()
    {
        if (m_fireJustStarted && !m_extingushed)
        {
            InstantiateFire(transform.position, m_fire);
            m_fireJustStarted = false;

            GetVisualManager();

            if (m_visualMgr != null)
            {
                m_visualMgr.SetIgnitionState();
            }
        }
    }