Пример #1
0
    // Use this for initialization
    void Start()
    {
        game      = GameObject.FindObjectOfType <GameController>();
        GameUI    = GameObject.FindObjectOfType <UIController>();
        EnemyChar = GameObject.FindObjectOfType <EnemyController>();
        PetCol    = GameObject.FindObjectOfType <PetController>();
        Log       = GameObject.FindObjectOfType <GameLogController>();
        PetController petcol = GameObject.FindObjectOfType <PetController>();


        Cool1Active = false;
        Cool2Active = false;
        Cool3Active = false;
        Cool4Active = false;


        CurrentPet = PlayerChar.PlayerPets[0];



        GameUI.Ability1Txt.text = CurrentPet.PetAbilities[0].Name;
        GameUI.Ability2Txt.text = CurrentPet.PetAbilities[1].Name;
        GameUI.Ability3Txt.text = CurrentPet.PetAbilities[2].Name;
        GameUI.Ability4Txt.text = CurrentPet.PetAbilities[3].Name;

        PetCol.SetColour();
    }
Пример #2
0
    void StartGame()
    {
        if (CurrentPet == null)
        {
            ChoosePet();


            SpawnPet(CurrentPet);
        }
        else
        {
            StartPlayerTurn();
        }

        GameUI.Ability1Txt.text = CurrentPet.PetAbilities[0].Name;
        GameUI.Ability2Txt.text = CurrentPet.PetAbilities[1].Name;
        GameUI.Ability3Txt.text = CurrentPet.PetAbilities[2].Name;
        GameUI.Ability4Txt.text = CurrentPet.PetAbilities[3].Name;

        PetCol.SetColour();
    }