Example #1
0
 void Awake()
 {
     if (instance == null)
     {
         DontDestroyOnLoad(gameObject);
         instance = this;
         LoadCombo();
         LoadComboRate();
     }
     if (instance != this)
     {
         Destroy(gameObject);
         return;
     }
 }
Example #2
0
    void Start()
    {
        var animalList = GameObject.Find("AnimalList");

        animalStatusCSV      = animalList.GetComponent <AnimalStatusCSV>();
        selectAnimalNum      = animalList.GetComponent <SelectAnimalNum>();
        animalTextureManager = animalList.GetComponent <AnimalTextureManager>();
        combManager          = animalList.GetComponent <CombManager>();

        distance.x = 65.0f + cage.GetComponent <RectTransform>().rect.width;
        distance.y = 95.0f + cage.GetComponent <RectTransform>().rect.width;

        CreateCage();
        SetCageToAnimal();

        StartCoroutine(UpDateCageList());
    }
Example #3
0
    void Awake()
    {
        if (instance == null)
        {
            DontDestroyOnLoad(gameObject);
            instance = this;
        }

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

        timer = GameObject.Find("Timer").GetComponent <Timer>();
        var animalList = GameObject.Find("AnimalList");

        animalStatusCSV = animalList.GetComponent <AnimalStatusCSV>();
        combManager     = animalList.GetComponent <CombManager>();

        LoadStatus();
    }