예제 #1
0
    // Use this for initialization
    void Start()
    {
        this.gameObject.transform.GetChild(0).gameObject.SetActive(false);

        thePlayer               = FindObjectOfType <PlayerController>();
        playerCreatures         = thePlayer.GetComponent <PlayerCreatureManager>();
        creatureInstanceManager = FindObjectOfType <CreatureInstanceManager>();
    }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        playerCreatures = FindObjectOfType <PlayerCreatureManager>();

        trainingManager = GetComponent <TrainingManager>();

        transform.GetChild(1).GetChild(0).GetChild(0).gameObject.GetComponent <Button>().onClick.AddListener(NewWeek);

        NewWeek();
    }
예제 #3
0
    // Use this for initialization
    void Start()
    {
        thePlayer             = FindObjectOfType <PlayerController>();
        playerCreatures       = thePlayer.GetComponent <PlayerCreatureManager>();
        creaturesInSceneStats = FindObjectsOfType <CreatureStatsManager>();
        creaturesInScene      = new List <GameObject>();

        for (int i = 0; i < creaturesInSceneStats.Length; i++)
        {
            creaturesInScene.Add(creaturesInSceneStats[i].gameObject);
        }

        levelCreatureLastSeenOn = new List <int>();
    }
예제 #4
0
    // Use this for initialization
    void Start()
    {
        thePlayer       = FindObjectOfType <PlayerController>();
        playerCreatures = thePlayer.GetComponent <PlayerCreatureManager>();
        //creatures = new List<CreatureStatsManager>();

        if (thePlayer.hasCreatureLeashed)
        {
            foreach (GameObject creature in playerCreatures.creaturesOwned)
            {
                if (creature.GetComponent <CreatureStatsManager>().isLeashed)
                {
                    leashedCreature = creature;
                }
            }

            if (leashedCreature != null)
            {
                //Instantiate(leashedCreature, this.transform.position, Quaternion.Euler(Vector3.zero));
                leashedCreature.transform.position = this.transform.position;
            }
        }
    }