コード例 #1
0
 private void Start()
 {
     turnBaseScript  = TurnBaseScript.instance;
     inventory       = Inventory.instance;
     dataRetainer    = DataRetainer.instance;
     equipmentHolder = EquipmentHolder.instance;
     endBattleMenu.SetActive(false);
     playerLevelUpMenu.SetActive(false);
 }
コード例 #2
0
ファイル: TurnBaseScript.cs プロジェクト: OpriaIonut/RPG-game
 private void Awake()
 {
     if (instance != null)
     {
         Destroy(this.gameObject);
     }
     else
     {
         instance = this;
     }
 }
コード例 #3
0
ファイル: EnemyCombatAI.cs プロジェクト: OpriaIonut/RPG-game
    private Status[] playerParty;                   //Retains the status for the targets

    private void Start()
    {
        turnManager = TurnBaseScript.instance;

        //Find all targets; you can't get only the status script from them so there was a need for a workaround
        GameObject[] playerAux = GameObject.FindGameObjectsWithTag("Player");
        playerParty = new Status[playerAux.Length];
        for (int index = 0; index < playerAux.Length; index++)
        {
            playerParty[index] = playerAux[index].GetComponent <Status>();
        }
    }
コード例 #4
0
ファイル: Hand.cs プロジェクト: milanm2121/GPG_GDG_230_v2
    // Start is called before the first frame update
    void Start()
    {
        AS   = GetComponent <AudioSource>();
        cam  = GameObject.Find("Main Camera").GetComponent <Camera>();
        deck = GetComponent <Deak>();
        TBS  = GameObject.Find("maneger object").GetComponent <TurnBaseScript>();
        cm   = GameObject.Find("maneger object").GetComponent <combat_maneger>();

        if (player == true && GameObject.Find("player deck") != null)
        {
            //copies static deck to the player ingame deck
            GameObject.Find("player deck").GetComponent <player_static_deck>().loadDeck();
        }
    }
コード例 #5
0
    private void Start()
    {
        turnBaseScript = TurnBaseScript.instance;
        eventSys       = EventSystem.current;
        combatScript   = CombatScript.instance;

        //Find all enemies; you can't get only the status script from them so there was a need for a workaround
        GameObject[] monsterAux = GameObject.FindGameObjectsWithTag("Enemy");
        enemyStatus = new Status[monsterAux.Length];
        for (int index = 0; index < monsterAux.Length; index++)
        {
            enemyStatus[index] = monsterAux[index].GetComponent <Status>();
        }
    }
コード例 #6
0
    private void Start()
    {
        //Initialize variables
        inventory      = Inventory.instance;
        eventSys       = EventSystem.current;
        combatScript   = CombatScript.instance;
        turnBaseScript = TurnBaseScript.instance;
        description    = descriptionTab.GetComponentInChildren <Text>();

        //Deactivate everything concerning this script (was useful when testing but wouldn't be too bad to keep them)
        //That is unless there are eficiency problems, in that case delete them but be careful that it doesn't mess up anything
        itemsParent.SetActive(false);
        descriptionTab.SetActive(false);
    }
コード例 #7
0
    private void Start()
    {
        //In the begining turn off player buttons
        combatButtons.SetActive(false);
        turnManager = TurnBaseScript.instance;
        eventSys    = EventSystem.current;

        //Find all enemies; you can't get only the status script from them so there was a need for a workaround
        GameObject[] monsterAux = GameObject.FindGameObjectsWithTag("Enemy");
        monsterParty = new Status[monsterAux.Length];
        for (int index = 0; index < monsterAux.Length; index++)
        {
            monsterParty[index] = monsterAux[index].GetComponent <Status>();
        }
    }
コード例 #8
0
 // Start is called before the first frame update
 void Start()
 {
     hand = GetComponent <Hand>();
     TBS  = GameObject.Find("maneger object").GetComponent <TurnBaseScript>();
 }