示例#1
0
    void Start()
    {
        actualSceneNameOnSceneSystem = SceneManager.GetActiveScene().name;
        primarySystemObject          = GameObject.FindWithTag("PrimarySystem");
        primarySystemScript          = primarySystemObject.GetComponent <primarySystem>();

        primarySystemScript.actualSceneName = actualSceneNameOnSceneSystem;
    }
示例#2
0
    void AssociateObjects()
    {
        primarySystemObject = GameObject.FindWithTag("PrimarySystem");
        primarySystemScript = primarySystemObject.GetComponent <primarySystem>();

        ImagePlayerOne = GameObject.Find("ImagePlayerOne");
        ImagePlayerTwo = GameObject.Find("ImagePlayerTwo");

        PlayerVictoryTextObj = GameObject.Find("PlayerVictoryText");
        TimerTextObj         = GameObject.Find("TimerText");

        PlayerVictoryText = PlayerVictoryTextObj.GetComponent <TextMeshProUGUI>();
        TimerText         = TimerTextObj.GetComponent <TextMeshProUGUI>();

        primarySystemScript.AssociatePrimarySystemAudio();
    }
    void Start()
    {
        //AssociateSystem
        primarySystemObject = GameObject.FindWithTag("PrimarySystem");
        primarySystemScript = primarySystemObject.GetComponent <primarySystem>();

        audioSystemObj    = GameObject.FindWithTag("CameraListener");
        audioSystemScript = audioSystemObj.GetComponent <audioSystem>();

        colliderPossitionY = 50.0f;

        AssociateShips();
        AssociateTexts();
        CheckSandbox();
        CalculateScore();

        primarySystemScript.AssociatePrimarySystemAudio();

        //distancia da partida sem sandbox
        necessaryDistance = 2000.0f;


        playerTimerSaver       = playerTimerOptionInMin;
        necessaryDistanceSaver = necessaryDistance;
        totalTimerSeconds      = 0.0f;
        iniciate = 0;

        BothCameraText.text          = "";
        SSNecessaryDistanceText.text = "-- " + Math.Round(necessaryDistance, 0).ToString() + " --";

        if (primarySystemScript.whichLang == "PT")
        {
            BackgroundStartText.text = "Pressione qualquer tecla para iniciar";
        }
        else if (primarySystemScript.whichLang == "EN")
        {
            BackgroundStartText.text = "Press any key to start";
        }
    }