Esempio n. 1
0
    // Start is called before the first frame update
    void Start()
    {
        loadBearWorld = GetComponent <LoadBearWorld>();
        loadMusic     = GetComponent <LoadMusic>();

        StartCoroutine(StartLoad());
    }
Esempio n. 2
0
	void Awake() {
		if (instance != null && instance != this) {
			Destroy(this.gameObject);
			return;
		} 

		else {
			instance = this;
		}
		DontDestroyOnLoad(this.gameObject);
	}
Esempio n. 3
0
    // Awake is called when the script instance is being loaded
    void Awake()
    {
        if (instance != null && instance != this)
        {
            Destroy(this.gameObject);
            return;
        }
        else
        {
            instance = this;
        }

        DontDestroyOnLoad(this.gameObject);
    }
Esempio n. 4
0
    // Awake is called when the script instance is being loaded
    void Awake()
    {
        Debug.Log("Trying to Load Music");

        if (instance != null && instance != this)
        {
            Destroy(this.gameObject); // Destroy duplicate instances
            return;
        }
        else
        {
            instance = this;
        }

        DontDestroyOnLoad(this.gameObject); // Music continues on next scene
    }
Esempio n. 5
0
    // Use this for initialization
    void Start()
    {
        //AndroidJavaObject myAndroidJavaObject = new AndroidJavaObject ("com.my");
        levelInfo = ((TextAsset)Resources.Load("FOOLS_G_b0"));

        RectTransform controlMask = GameObject.Find("controlMask").GetComponent <RectTransform> ();

        unitsToTravel = Screen.height / 2.0 + controlMask.transform.localPosition.y + (-1) * ((GameObject)Resources.Load("kross")).transform.localPosition.y;

        canvas        = GameObject.Find("Canvas").GetComponent <Canvas> ();
        audioSource   = GameObject.Find("Song").GetComponent <AudioSource> ();
        loadMusic     = new LoadMusic(levelInfo, CalcCorrectionSeconds(velocity));
        songTime      = GameObject.Find("SongTime").GetComponent <Text> ();
        progressSong  = GameObject.Find("progressSong").GetComponent <Image> ();
        gameOver      = GameObject.Find("Finish").GetComponent <Transform>();
        gameOverReady = true;

        DeleteArrows.init();
        var readySetGoVar = Instantiate((GameObject)Resources.Load("ReadySetGo"));

        readySetGoVar.transform.SetParent(canvas.transform);

        audioSource.Play();
    }