Exemple #1
0
    public void Start()
    {
        anim = gameObject.GetComponent <Animator>();
        GameObject     gameMaster   = GameObject.FindGameObjectWithTag("Master");
        animalSelector animSelector = gameMaster.GetComponent <animalSelector>();

        gameProg = gameMaster.GetComponent <gameProggresion>();
        if (gameObject.tag == animSelector.selectedAnimal.transform.GetChild(0).tag)
        {
            isTarget = true;
        }
    }
Exemple #2
0
    // Update is called once per frame
    void Update()
    {
        TagHunter       dataCollector = player.GetComponent <TagHunter>();
        gameProggresion endSession    = master.GetComponent <gameProggresion>();

        sessionState = endSession.end;

        if (sessionState == true && timeToExport == false)
        {
            sumTerrain        = dataCollector.getTerrain();
            sumWater          = dataCollector.getWater();
            sumTrees          = dataCollector.getTrees();
            sumRocks          = dataCollector.getRocks();
            sumCorrectFoxes   = dataCollector.getCorrectFoxes();
            sumIncorrectFoxes = dataCollector.getIncorrectFoxes();
            sumSky            = dataCollector.getSky();
            timeToExport      = true;
            csvMaker();
        }
    }