示例#1
0
 public void ReassignObjs()
 {
     GUIHelp       = GameObject.FindGameObjectWithTag("GUI").GetComponent <GUIhelper>();
     m_EnemyAmount = GUIHelp.m_NumberOfEnemies;
     SetCoins(0);
     SetMaxHealth(m_Health);
 }
示例#2
0
    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());
    }
示例#3
0
 // 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>();
 }
示例#4
0
 public virtual void Start()
 {
     GUIHelp = GameObject.FindGameObjectWithTag("GUI").GetComponent <GUIhelper>();
     player  = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>();
     StartCoroutine(WaitForAssignment());
 }
示例#5
0
 public void ReassignObjs()
 {
     GUIHelp = GameObject.FindGameObjectWithTag("GUI").GetComponent <GUIhelper>();
 }