void Awake() { if (instance == null) { DontDestroyOnLoad(gameObject); instance = this; LoadCombo(); LoadComboRate(); } if (instance != this) { Destroy(gameObject); return; } }
void Start() { var animalList = GameObject.Find("AnimalList"); animalStatusCSV = animalList.GetComponent <AnimalStatusCSV>(); selectAnimalNum = animalList.GetComponent <SelectAnimalNum>(); animalTextureManager = animalList.GetComponent <AnimalTextureManager>(); combManager = animalList.GetComponent <CombManager>(); distance.x = 65.0f + cage.GetComponent <RectTransform>().rect.width; distance.y = 95.0f + cage.GetComponent <RectTransform>().rect.width; CreateCage(); SetCageToAnimal(); StartCoroutine(UpDateCageList()); }
void Awake() { if (instance == null) { DontDestroyOnLoad(gameObject); instance = this; } if (instance != this) { Destroy(gameObject); return; } timer = GameObject.Find("Timer").GetComponent <Timer>(); var animalList = GameObject.Find("AnimalList"); animalStatusCSV = animalList.GetComponent <AnimalStatusCSV>(); combManager = animalList.GetComponent <CombManager>(); LoadStatus(); }