// Use this for initialization void Start() { spriteController = FindObjectOfType <SpriteController>(); dataController = FindObjectOfType <DataController>(); currentGod = dataController.GetCurrentGod(LevelSelect.level); rulesRoot.SetActive(false); portaitRoot.SetActive(false); godName = currentGod.name; godOf = "God of " + currentGod.godOf; Fiction = currentGod.Fiction; gameRules = currentGod.GameRules; for (int i = 0; i < godNameText.Count; i++) { godNameText[i].text = godName; } for (int i = 0; i < godOfText.Count; i++) { godOfText[i].text = godOf; } godOfPara[0].text = Fiction[0]; godOfPara[1].text = gameRules[0]; Portait.sprite = spriteController.GodPortaits[LevelSelect.level]; }
private void Awake() { dataController = FindObjectOfType <DataController>(); spriteController = FindObjectOfType <SpriteController>(); god = dataController.GetCurrentGod(ID); }