Пример #1
0
    // Use this for initialization
    void Start()
    {
        sceneScript = GameObject.Find("gameManager").GetComponent <SceneManagementScript>();

        audioLib    = GameObject.Find("audioLibrary").GetComponent <audioLibrary>();
        myAudSource = gameObject.GetComponent <AudioSource>();
    }
Пример #2
0
 void Awake()
 {
     main = this;
     mainMenuPanel.SetActive(true);
     pausePanel.SetActive(false);
     playInstructionPanel.SetActive(false);
     scorePanel.SetActive(true);
     leftRacket.GetComponent <RacketControllerScript>().isAI  = true;
     rightRacket.GetComponent <RacketControllerScript>().isAI = true;
 }
Пример #3
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
Пример #4
0
    // Use this for initialization
    void Start()
    {
        aimPointer.SetActive(false);
        player         = GameObject.Find("Player").GetComponent <Transform>();
        playerBody     = GameObject.Find("PlayerBody").GetComponent <Transform>();
        bigHitMesh     = GameObject.Find("BigHit").GetComponent <MeshRenderer>();
        smallHitMesh   = GameObject.Find("SmallHit").GetComponent <MeshRenderer>();
        playerRB       = GameObject.Find("PlayerBody").GetComponent <Rigidbody>();
        SwishObj       = GameObject.Find("Swish");
        swishTrail     = GameObject.Find("Swish").GetComponent <TrailRenderer>();
        swishPivot     = GameObject.Find("SwishPivot").GetComponent <Transform>();
        AliceRenderer  = GameObject.Find("node_id5").GetComponent <Renderer>();
        playerSwishPos = playerBody.transform.position;

        swishTrail.enabled = false;

        audioLib    = GameObject.Find("audioLibrary").GetComponent <audioLibrary>();
        myAudSource = playerBody.GetComponent <AudioSource>();

        sceneScript = GameObject.Find("gameManager").GetComponent <SceneManagementScript>();

        GameObject tempHealthFinder = GameObject.Find("pHealthContainer");

        for (int i = 0; i < HealthObj.Length; i++)
        {
            HealthObj[i] = tempHealthFinder.transform.GetChild(i).gameObject;
        }

        canBigHit   = false;
        canSmallHit = false;

        performSwish = false;
        swishRight   = true;

        bigTimer   = 0;
        smallTimer = 0;

        isControllerConnected = false;

        isInvulnerable = false;
    }
Пример #5
0
 private void Start()
 {
     activeObjects   = new List <GameObject>();
     sceneManagerScr = SceneManager.GetComponent <SceneManagementScript>();
 }