コード例 #1
0
    public void RemoveUnit(Transform _transform, GV.MUSHROOM_TYPE _type)
    {
        switch (_type)
        {
        case GV.MUSHROOM_TYPE.PLAYER:
            RemoveUnitFromList(_transform, playerUnits);
            break;

        case GV.MUSHROOM_TYPE.AI:
            RemoveUnitFromList(_transform, aiUnits);
            break;
        }

        GameObject.Destroy(_transform.gameObject);
    }
コード例 #2
0
    public void SwitchTeam(Transform _transform, GV.MUSHROOM_TYPE _type, Mushroom _mushroom)
    {
        switch (_type)
        {
        case GV.MUSHROOM_TYPE.PLAYER:
            m_ai.Remove(_transform);
            m_player.Add(_transform, _mushroom);
            _transform.SetParent(playerParent);
            _transform.tag = GV.MUSHROOM_TAG_PLAYER;
            break;

        case GV.MUSHROOM_TYPE.AI:
            m_player.Remove(_transform);
            m_ai.Add(_transform, _mushroom);
            _transform.SetParent(aiParent);
            _transform.tag = GV.MUSHROOM_TAG_AI;
            break;
        }
    }