Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class Beastiery : MonoBehaviour
- {
- public GameObject beastiery;
- public GameObject[] entries;
- public GameObject[] theHabitates;
- public Button[] buttons;
- CreatureBase creatureBase;
- public List<int> IDs = new List<int>();
- public void EnableEntryButton(int id)
- {
- buttons[id - 1].interactable = true;
- }
- public void EnableEntry(int id)
- {
- for (int i = 0; i < entries.Length; i++)
- {
- entries[i].SetActive(false);
- }
- // only enable coosen creature.
- entries[id].SetActive(true);
- }
- public void OpenBeasteary()
- {
- beastiery.SetActive(true);
- }
- public void addIDs(int idtoAdd)
- {
- for (int i = 0; i < IDs.Count; i++)
- {
- if (IDs == null)
- {
- IDs.Add(idtoAdd);
- }
- }
- }
- public void OpenEarthHabitate()
- {
- theHabitates[0].SetActive(true);
- }
- public void OpenWaterHabitate()
- {
- theHabitates[1].SetActive(true);
- }
- public void OpenFireHabitate()
- {
- theHabitates[2].SetActive(true);
- }
- public void OpenDarknessHabitate()
- {
- theHabitates[3].SetActive(true);
- }
- public void OpenEtharealHabitate()
- {
- theHabitates[4].SetActive(true);
- }
- }
Add Comment
Please, Sign In to add comment