void GetBuff(int index) { if (!characterCluster) { characterCluster = GameObject.FindGameObjectWithTag("CharacterCluster").GetComponent <CharacterCluster>(); } switch (index) { // heal case 0: HealAll(); Debug.Log(buffList.buffList[index].description); break; case 1: AttackUp(); Debug.Log(buffList.buffList[index].description); break; default: Debug.Log("Out of index"); break; } Destroy(gameObject); }
public void Camp() { Instantiate(resultUI, transform.position, Quaternion.identity); // destroy character on return CharacterCluster characterCluster = GameObject.FindGameObjectWithTag("CharacterCluster").GetComponent <CharacterCluster>(); characterCluster.Disappear(); int result = WorldDestroyer.CalculateResult(characterCluster.characterLists.Count, 1.0f, 1.0f); GameState.instance.UpdateWDPosition(result); // Save current position GameState.instance.SavePosition(); // setupCamp position CampUI.Instance.ActivePosition(); Destroy(this.gameObject); }
// Start is called before the first frame update void Start() { currentTime = maxTime; characterCluster = GameObject.FindGameObjectWithTag("CharacterCluster").GetComponent <CharacterCluster>(); dungeonInfo = GameObject.FindGameObjectWithTag("Info").GetComponent <DungeonInfo>(); if (characterCluster.currentMapLocation == 4) { dungeonInfo.SetUpRooms(); } }
private void InitializeData() { if (characterCluster == null) { characterCluster = GameObject.FindGameObjectWithTag("CharacterCluster").GetComponent <CharacterCluster>(); } if (enemy == null) { enemy = GameObject.FindGameObjectWithTag("Enemy").GetComponent <Enemy>(); } if (boss == null) { boss = GameObject.FindGameObjectWithTag("Boss").GetComponent <Boss>(); } }
// Start is called before the first frame update void Start() { currentHealth = maxHealth; characterCluster = GameObject.FindGameObjectWithTag("CharacterCluster").GetComponent <CharacterCluster>(); }