Esempio n. 1
0
    void Start()
    {
        _CharacterController = GetComponent <CharacterController> ();

        _NormalSpeed = m_Speed;

        _Cam = FindObjectOfType <Camera_Follow> ();
    }
Esempio n. 2
0
    void Start()
    {
        gmScript = GameObject.FindGameObjectWithTag("GM").GetComponent <GameMaster> ();
        if (Application.loadedLevel == 0)
        {
            townCentral     = GameObject.FindGameObjectWithTag("Town_Central").GetComponent <Town_Central>();
            camFollowScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Camera_Follow>();
            mapScript       = GetComponent <Map_Manager>();
        }

        myTransform = transform;
        // FOR NOW im going to spawn a selection box here to be able to see what town tile i have selected
        GameObject tileSelectBox = Instantiate(selectionBox, myTransform.position, Quaternion.identity) as GameObject;

        tileSelectBox.transform.parent = myTransform;
        stopSelecting = false;
    }
Esempio n. 3
0
 private void Start()
 {
     target     = playerTarget;
     targetSize = Camera.main.orthographicSize;
     instance   = this;
 }
Esempio n. 4
0
 void Awake()
 {
     camScript = this.GetComponent<Camera_Follow>();
 }
Esempio n. 5
0
 void Start()
 {
     rb            = GetComponent <Rigidbody>();
     anim          = GetComponent <Animator>();
     camController = GetComponent <Camera_Follow>();
 }