Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        if (instance == null)
        {
            instance = this;
        }

        if (instance != this)
        {
            Destroy(this.gameObject);
        }

        ZoneColors = new GangColor[11];



        currentTime = startingTime;
        if (gameState == GameState.InOverworld)
        {
            bat = FindObjectOfType <BattleArenaTrigger>();

            for (int i = 0; i < bat.triggerCollisions.Length; i++)
            {
                ZoneColors[i] = bat.triggerCollisions[i].zoneColor;
            }

            emms = FindObjectsOfType <EnemyMapMovement>();
        }


        emmis = new EnemyMapMovementInfo[2];
    }
Exemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        bat = FindObjectOfType <BattleArenaTrigger>();
        cc  = gameObject.AddComponent <CharacterController>();

        if (SpawnPoints == null)
        {
            SpawnPoints = GameObject.Find("SpawnPoints");
        }

        Transform[] spawnPoints = GetComponentsInChildren <Transform>();

        transform.position = spawnPoints[Random.Range(0, spawnPoints.Length - 1)].position;
    }