コード例 #1
0
 // Use this for initialization
 void Start()
 {
     managerObject = GameObject.FindGameObjectWithTag("Manager");
     manager       = managerObject.GetComponent <Manager_Script>();
     utils         = managerObject.GetComponent <Cat_Utilites>();
     catControl    = GetComponent <Cat_Control>();
     utils.usedNames.Add(catControl.catName);
 }
コード例 #2
0
    public void Start()
    {
        PlayerName     = "Player Name";
        numSettings[0] = 0;         //Save file not set;
        music          = GetComponent <Music_Manager>();
        utils          = GetComponent <Cat_Utilites>();
        Scene scene = SceneManager.GetActiveScene();

        currentScene = scene.buildIndex;
        lastScene    = scene.buildIndex;
        onSceneChange();
    }
コード例 #3
0
    // Use this for initialization
    void Start()
    {
        managerObject = GameObject.FindGameObjectWithTag("Manager");
        manager       = managerObject.GetComponent <Manager_Script>();
        catControl    = GetComponent <Cat_Control>();
        utils         = managerObject.GetComponent <Cat_Utilites>();
        string newName;

        rank               = catControl.rank;
        newName            = utils.RandName(rank);
        catControl.catName = newName;
        utils.usedNames.Add(newName);

        stepper = Random.Range(0, STEP_LIMIT);
    }
コード例 #4
0
    // Use this for initialization
    void Start()
    {
        managerObject = GameObject.FindGameObjectWithTag("Manager");
        manager       = managerObject.GetComponent <Manager_Script>();
        utils         = managerObject.GetComponent <Cat_Utilites>();

        int cats;

        cats = targetCats + Random.Range(-3, 3);

        if (sceneType == Globals.SCENE_TYPE.Camp)
        {
            //create leader
            AddCat(Globals.RANK.Leader);

            //Create warriors
            for (int i = 0; i < cats / 0.8; i++)
            {
                AddCat(Globals.RANK.Warrior);
            }
        }
    }