void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } else { instance = this; } DontDestroyOnLoad(this.gameObject); }
public void Start() { if (GameObject.FindGameObjectWithTag("LeaderboardPanel") != null) { leaderboardPanel = GameObject.FindGameObjectWithTag("LeaderboardPanel"); leaderboardScoresObj = GameObject.FindGameObjectWithTag("LeaderboardScores"); leaderboardNamesObj = GameObject.FindGameObjectWithTag("LeaderboardNames"); //leaderboardPanel.SetActive(false); } gameSettings = gameObject.GetComponent <GameSettingsScript>(); //gameSettings = GameObject LoginToPlayfab(); }
// Use this for initialization void Start() { GatherBuildSettings(); worldSpawner = GameObject.Find("World").GetComponent<SpawnWorldScript>(); funnieArmController = GameObject.Find("ParrotContainer").GetComponent<FunnieMovementScript>(); funnieBodyController = GameObject.Find("ParrotContainer").GetComponent<FunnieAltMovementScript>(); settings = GameObject.Find("GameSettings").GetComponent<GameSettingsScript>(); if (settings.controllerChoice == 1) { funnieBodyController.enabled = true; funnieArmController.enabled = false; } else { funnieBodyController.enabled = false; funnieArmController.enabled = true; } if (GameObject.Find("LogSys(Clone)") == null) { GameObject log = Instantiate(Resources.Load("LogSys")) as GameObject; } }
// Use this for initialization void Start() { gameSettings = GameObject.Find("GameSettings").GetComponent<GameSettingsScript>(); }
// Use this for initialization void Start() { gameSettings = GameObject.Find("GameSettings").GetComponent<GameSettingsScript>(); backgroundHolder = GameObject.Find("Background").GetComponent<GUITexture>(); cursor = GameObject.Find("HandPointer").GetComponent<MenuMovement>(); SFX = GameObject.Find("SFXHandler"); }
private void Awake() { Instance = this; }
void Main() { settings = GameObject.Find("GameSettings").GetComponent<GameSettingsScript>(); }
void Start() { gameSettings = GameObject.Find ("GameSettings").GetComponent<GameSettingsScript>(); menuHolder = GameObject.Find("menuHolder"); /* //figureButton = new Rect(Screen.width / 2 + 300, Screen.height / 2 - 100, 200, 200); //monkeyButton = new Rect(Screen.width / 2 + 100, Screen.height / 2 - 100, 200, 200); tutorialButton = new Rect(Screen.width / 2 - 100, Screen.height / 2 - 100, 200, 200); startButton = new Rect(Screen.width / 2 - 100, Screen.height / 2 - 100, 550, 150); fiveMinButton = new Rect(Screen.width / 2 - 300, Screen.height / 2 - 100, 200, 200); choiceButton = new Rect(Screen.width / 2 - 500, Screen.height / 2 - 100, 200, 200); saveSelectionButton = new Rect(Screen.width / 2 - 100, Screen.height / 2 + 200, 200, 200); Debug.Log ("Initiated"); */ }