コード例 #1
0
ファイル: DiamondManager.cs プロジェクト: LyesAtek/HighHoop
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
コード例 #2
0
ファイル: MainMenu.cs プロジェクト: Hakobyan8888/TapToJump
    void Start()
    {
        if (PlayerPrefs.HasKey("SecondPlayer"))
        {
            SecondPlayerBought = PlayerPrefs.GetInt("SecondPlayer");
        }
        if (PlayerPrefs.HasKey("ThirdPlayer"))
        {
            ThirdPlayerBought = PlayerPrefs.GetInt("ThirdPlayer");
        }
        if (PlayerPrefs.HasKey("ForthPlayer"))
        {
            ForthPlayerBought = PlayerPrefs.GetInt("ForthPlayer");
        }

        Character2True = 0;

        SecondPlayerBought = 0;
        ThirdPlayerBought  = 0;
        ForthPlayerBought  = 0;
        theDiamondManager  = FindObjectOfType <DiamondManager>();
        diamondCountStore  = theDiamondManager.diamondCount;
    }
コード例 #3
0
 void Awake()
 {
     _instance = this;
 }
コード例 #4
0
    // Use this for initialization
    void Start()
    {
        theDiamondManager = FindObjectOfType <DiamondManager>();

        DiamondSound = GameObject.Find("Pickup Coin").GetComponent <AudioSource>();
    }
コード例 #5
0
	void Awake(){
		_instance = this;
	}