public void ReassignObjs() { GUIHelp = GameObject.FindGameObjectWithTag("GUI").GetComponent <GUIhelper>(); m_EnemyAmount = GUIHelp.m_NumberOfEnemies; SetCoins(0); SetMaxHealth(m_Health); }
void Start() { GameManager.instance.m_InitialCurrency = GameManager.instance.m_Currency; m_PlayerRB2D = this.GetComponent <Rigidbody2D>(); m_CurrentHealth = GameManager.instance.m_Health; GUIHelp = GameObject.FindGameObjectWithTag("GUI").GetComponent <GUIhelper>(); m_Anim = GetComponent <Animator>(); if (GameManager.instance.m_NeedsSpawnPosition) { transform.position = GameManager.instance.m_SpawnPosition; GameManager.instance.m_NeedsSpawnPosition = false; } //quitar comentarios cuando se deje de testear if (!GunBoughtArrayActivator) { GunBoughtArray = new bool[GunArray.Length]; GunBoughtArrayActivator = true; } GunBoughtArray[0] = true; m_CurrentGun = GunArray[0].GetComponent <Gun>(); int i = 0; foreach (GameObject item in GunArray) { GameManager.instance.m_WeaponsArray[i] = item.GetComponent <Gun>(); i++; } StartCoroutine(WaitForEndOfAssignment()); }
// Start is called before the first frame update void Start() { thisTag = this.tag; guiHelp = GameObject.FindGameObjectWithTag("GUI").GetComponent <GUIhelper>(); guiHelp.m_CoinPickupText.SetActive(false); m_Player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); }
public virtual void Start() { GUIHelp = GameObject.FindGameObjectWithTag("GUI").GetComponent <GUIhelper>(); player = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>(); StartCoroutine(WaitForAssignment()); }
public void ReassignObjs() { GUIHelp = GameObject.FindGameObjectWithTag("GUI").GetComponent <GUIhelper>(); }