Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        startPosition = this.transform.position;
        shieldSize = 2.5f;

        isShielded = true;
        StartCoroutine("ResetShield");

        baseReloadTime = reloadTime;

        audios = this.gameObject.GetComponents<AudioSource>();

        stats = GameObject.FindGameObjectWithTag("Stats").GetComponent<Stat_Counter_Script>();
    }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     stats = GameObject.FindGameObjectWithTag("Stats").GetComponent<Stat_Counter_Script>();
 }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        //We should persist for the next level transition
        //DontDestroyOnLoad(this);		not any more, because that was bogus.
        playerGravityScript = this.gameObject.GetComponent<Player_Gravity_Script>();
        wallJumpsLeft = wallJumpsAllowed;

        spawners = GameObject.FindGameObjectsWithTag("Spawnpoint");

        GameObject[] tempArray = new GameObject[spawners.Length];
        for (int i = 0; i < tempArray.Length; i++)
        {
            for (int j = 0; j < spawners.Length; j++)
            {
                if (spawners[j].name.Contains((i + 1).ToString()))
                {
                    /*SpawnPoint_ = Length 11 + the number of numerals afterward */
                    if ((spawners[j].name.Length == 14 && (i + 1).ToString().Length == 3)
                        || (spawners[j].name.Length == 13 && (i + 1).ToString().Length == 2)
                        || (spawners[j].name.Length == 12 && (i + 1).ToString().Length == 1))
                    {
                        //print((i + 1) + " " + spawners[j].name);
                        tempArray[i] = spawners[j];
                        break;
                    }
                }
            }
        }

        spawners = tempArray;

        audios = this.GetComponents<AudioSource>();

        stats = GameObject.FindGameObjectWithTag("Stats").GetComponent<Stat_Counter_Script>();
    }