Ejemplo n.º 1
0
    void Awake()
    {
        if (cursorLock == true) // Hide Cursor
        {
            Cursor.lockState = CursorLockMode.Locked;
            Cursor.visible   = false;
        }

        Scene();

        // HERO
        hero = GameObject.CreatePrimitive(PrimitiveType.Capsule);                                 // Create an Object
        hero.AddComponent <Hero>().Init(hero, CharacterNames(), CharacterAge(), text[2], images[0]);
        hero.transform.position = new Vector3(Random.Range(-40, 40), .5f, Random.Range(-40, 40)); // Random Position
        // END HERO

        // CITIZEN AND ZOMBIES
        RandomMin = Random.Range(5, 16);
        MinSpawn ms = new MinSpawn(ref RandomMin);

        CoZ(Random.Range(ms.Min, ConstMax)); // Random Amount
        // END CITIZEN AND ZOMBIES

        // CANVAS
        DisplayQuantity();
        // END CANVAS
    }
Ejemplo n.º 2
0
 public void Initialize(MinSpawn minSpawnReference)
 {
     minSpawn = minSpawnReference;
 }