private void Start() { turnBaseScript = TurnBaseScript.instance; inventory = Inventory.instance; dataRetainer = DataRetainer.instance; equipmentHolder = EquipmentHolder.instance; endBattleMenu.SetActive(false); playerLevelUpMenu.SetActive(false); }
private void Awake() { if (instance != null) { Destroy(this.gameObject); } else { instance = this; } }
private Status[] playerParty; //Retains the status for the targets private void Start() { turnManager = TurnBaseScript.instance; //Find all targets; you can't get only the status script from them so there was a need for a workaround GameObject[] playerAux = GameObject.FindGameObjectsWithTag("Player"); playerParty = new Status[playerAux.Length]; for (int index = 0; index < playerAux.Length; index++) { playerParty[index] = playerAux[index].GetComponent <Status>(); } }
// Start is called before the first frame update void Start() { AS = GetComponent <AudioSource>(); cam = GameObject.Find("Main Camera").GetComponent <Camera>(); deck = GetComponent <Deak>(); TBS = GameObject.Find("maneger object").GetComponent <TurnBaseScript>(); cm = GameObject.Find("maneger object").GetComponent <combat_maneger>(); if (player == true && GameObject.Find("player deck") != null) { //copies static deck to the player ingame deck GameObject.Find("player deck").GetComponent <player_static_deck>().loadDeck(); } }
private void Start() { turnBaseScript = TurnBaseScript.instance; eventSys = EventSystem.current; combatScript = CombatScript.instance; //Find all enemies; you can't get only the status script from them so there was a need for a workaround GameObject[] monsterAux = GameObject.FindGameObjectsWithTag("Enemy"); enemyStatus = new Status[monsterAux.Length]; for (int index = 0; index < monsterAux.Length; index++) { enemyStatus[index] = monsterAux[index].GetComponent <Status>(); } }
private void Start() { //Initialize variables inventory = Inventory.instance; eventSys = EventSystem.current; combatScript = CombatScript.instance; turnBaseScript = TurnBaseScript.instance; description = descriptionTab.GetComponentInChildren <Text>(); //Deactivate everything concerning this script (was useful when testing but wouldn't be too bad to keep them) //That is unless there are eficiency problems, in that case delete them but be careful that it doesn't mess up anything itemsParent.SetActive(false); descriptionTab.SetActive(false); }
private void Start() { //In the begining turn off player buttons combatButtons.SetActive(false); turnManager = TurnBaseScript.instance; eventSys = EventSystem.current; //Find all enemies; you can't get only the status script from them so there was a need for a workaround GameObject[] monsterAux = GameObject.FindGameObjectsWithTag("Enemy"); monsterParty = new Status[monsterAux.Length]; for (int index = 0; index < monsterAux.Length; index++) { monsterParty[index] = monsterAux[index].GetComponent <Status>(); } }
// Start is called before the first frame update void Start() { hand = GetComponent <Hand>(); TBS = GameObject.Find("maneger object").GetComponent <TurnBaseScript>(); }