예제 #1
0
    public void DeleteObj(int _type, GameObject _obj)
    {
        switch (_type)
        {
        case 1:
            Pool_MonsterA.Enqueue(_obj);
            break;

        case 2:
            Pool_MonsterB.Enqueue(_obj);
            break;

        case 3:
            Pool_MonsterC.Enqueue(_obj);
            break;

        case 4:
            Pool_BulletA.Enqueue(_obj);
            break;

        case 5:
            Pool_BulletB.Enqueue(_obj);
            break;

        case 6:
            Pool_BulletC.Enqueue(_obj);
            break;

        case 7:
            Pool_BossBullet.Enqueue(_obj);
            break;
        }
        _obj.SetActive(false);
    }
예제 #2
0
    public GameObject MakeObj(int _type)
    {
        GameObject temp;

        switch (_type)
        {
        case 1:
            temp = Pool_MonsterA.Dequeue();
            break;

        case 2:
            temp = Pool_MonsterB.Dequeue();
            break;

        case 3:
            temp = Pool_MonsterC.Dequeue();
            break;

        case 4:
            temp = Pool_BulletA.Dequeue();
            break;

        case 5:
            temp = Pool_BulletB.Dequeue();
            break;

        case 6:
            temp = Pool_BulletC.Dequeue();
            break;

        case 7:
            temp = Pool_BossBullet.Dequeue();
            break;

        default:
            temp = Pool_BossBullet.Dequeue();
            break;
        }
        temp.SetActive(true);
        return(temp);
    }