public static GererVariablesGlobales getGererVariablesGlobales() { if(instance == null){ instance = new GererVariablesGlobales(); } return instance; }
void Start() { countDrink = 0; doucheDirection = (DoucheMovement_002)GameObject.Find ("DoucheBag_002").GetComponent("DoucheMovement_002"); variablesGlobales = GererVariablesGlobales.getGererVariablesGlobales(); text1.text = "IP: " + variablesGlobales.money.ToString(); text2.text = "Relation: " + variablesGlobales.relation.ToString(); lightSpot = (LightSpotAngle_002)GameObject.Find("Spotlight_002").GetComponent("LightSpotAngle_002"); //Audio pour Coins audioCoins = (AudioSource)gameObject.AddComponent("AudioSource"); AudioClip myAudioClipCoins; if(myAudioClipCoins = (AudioClip)Resources.Load("others/Chad_Coins_Pickup_Sound")) audioCoins.clip = myAudioClipCoins; audioCoins.volume = 1; //Audio pour drinks audioDrink = (AudioSource)gameObject.AddComponent("AudioSource"); AudioClip myAudioClipDrink; myAudioClipDrink = (AudioClip)Resources.Load("others/Chad_Drinks_Pickup_Sound"); audioDrink.clip = myAudioClipDrink; //Audio pour collisions douchebag audioDouchebag = (AudioSource)gameObject.AddComponent("AudioSource"); AudioClip myAudioClipDouchebag; myAudioClipDouchebag = (AudioClip)Resources.Load("others/Douchebag_Collision_Sound"); audioDouchebag.clip = myAudioClipDouchebag; //Audio pour collisions Jump audioJump = (AudioSource)gameObject.AddComponent("AudioSource"); AudioClip myAudioClipJump; myAudioClipJump = (AudioClip)Resources.Load("others/Chad_Jump_Sound"); audioJump.clip = myAudioClipJump; }
void Start() { variablesGlobales = GererVariablesGlobales.getGererVariablesGlobales(); text.text = "Money: " + variablesGlobales.money.ToString(); }