Ejemplo n.º 1
0
    public void Upgrade(E_UPGRADES type)
    {
        if (type == E_UPGRADES.MOVE_CRATE)
        {
            if (!m_states2D[2])
            {
                m_states2D[2] = gameObject.AddComponent <MoveingBox>();
                m_states2D[2].Initialize(m_rigb, m_data);
                m_states3D[2] = m_states2D[2];

                m_saveData.AddUpgrade(type);
            }
        }
        else if (type == E_UPGRADES.GHOST_1)
        {
            // makes sure the player hasn't already got this upgrade
            if (m_ghostList.m_ghostsCreated < 1)
            {
                m_ghostList.createGhost();
            }
        }
        else if (type == E_UPGRADES.GHOST_2)
        {
            if (m_ghostList.m_ghostsCreated < 2)
            {
                m_ghostList.createGhost();
            }
        }
    }
Ejemplo n.º 2
0
    public void AddUpgrade(E_UPGRADES type)
    {
        m_upgrades |= (char)IntToBit((int)type);
        m_data      = ((int)m_upgrades).ToString();

        Save();

        if (m_soundSystem)
        {
            m_soundSystem.NextTrack();
        }
    }