예제 #1
0
    public void MudarDeFase(FaseDeJogo novaFase)
    {
        fase = novaFase;

        switch (fase)
        {
        case FaseDeJogo.Preparacao:
            alienspawn.SetActive(false);
            gameObject.GetComponent <ControleDeArraste> ().HabilitarArraste();
            Camera.main.GetComponent <CameraControl> ().Enable();
            break;

        case FaseDeJogo.Jogo:
            gameObject.GetComponent <ControleDeArraste> ().DesabilitarArraste();
            Camera.main.GetComponent <CameraControl>().Disable();
            alienspawn.SetActive(true);
            activateCannon = true;
            break;
        }
    }
예제 #2
0
    void Start()
    {
        fase = FaseDeJogo.NONE;

        prep = false;

        Cannon      = GameObject.Find("Cannon");
        LaserCannon = GameObject.Find("LaserCannon");
        Shotgun     = GameObject.Find("Shotgun");

        objetosInstanciados = false;
        alienspawn          = GameObject.FindGameObjectWithTag("Respawn");
        alienspawn.SetActive(false);
        toolList      = GameObject.FindGameObjectsWithTag("Tool");
        activateArmas = new bool[3];
        foreach (GameObject tool in toolList)
        {
            tool.SetActive(false);
        }


        planeta = null;
    }