Example #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);
 }
Example #2
0
 // Use this for initialization
 void Start()
 {
     managerObject = GameObject.FindGameObjectWithTag("Manager");
     manager       = managerObject.GetComponent <Manager_Script>();
     player        = GetComponent <AudioSource>();
     player.loop   = false;
     PlaySong();
     playingState = state;
 }
Example #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);
    }
    // Start is called before the first frame update
    void Start()
    {
        shield3D = GameObject.CreatePrimitive(PrimitiveType.Sphere);
        shield3D.transform.parent     = transform;
        shield3D.transform.localScale = 10 * Vector3.one;
        shieldRender = shield3D.GetComponent <Renderer>();

        shieldOpacity = shield / 200;
        //shieldOpacity = .8f;
        shieldRender.material.color = new Color(0, 0, 1f, shieldOpacity);

        shieldRender.material.shader = Shader.Find("Transparent/Diffuse");

        myCamera    = Camera.main.GetComponent <CameraControl>();
        the_manager = FindObjectOfType <Manager_Script>();
    }
Example #5
0
    // Use this for initialization
    void Start()
    {
        managerObject = GameObject.FindGameObjectWithTag("Manager");
        manager       = managerObject.GetComponent <Manager_Script>();

        saveButton.onClick.AddListener(SaveClick);
        loadButton.onClick.AddListener(LoadClick);

        frontTreeSpeed  = speed * 2.5f;
        middleTreeSpeed = speed * 2.0f;
        lightSpeed      = speed * 1.15f;
        backTreeSpeed   = speed * 1.0f;

        goingLeft = true;

        LoadClick();
        playerNameEntry.text = placeholder.text;
    }
Example #6
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);
            }
        }
    }
 internal void I_am_the_Manager(Manager_Script manager_Script)
 {
     the_manager = manager_Script;
 }
 // Start is called before the first frame update
 void Start()
 {
     //     theCube = FindObjectOfType<CubeControl>();
     myCamera    = Camera.main.GetComponent <CameraControl>();
     the_manager = FindObjectOfType <Manager_Script>();
 }