Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        gd = GameObject.FindObjectOfType <GizmoDebug>().GetComponent <GizmoDebug>();

        player       = GameObject.Find("Player");
        triggers     = GameObject.FindGameObjectsWithTag("CameraZone");
        interactObjs = GameObject.FindObjectsOfType <interactuable> ();
    }
Esempio n. 2
0
    void Start()
    {
        // Cache component lookups at startup instead of every frame
        thisTransform    = transform;
        cam              = Camera.main;
        navi             = GetComponent <NavMeshAgent>();
        _inventory       = GetComponent <InventoryControl>();
        gd               = GameObject.FindObjectOfType <GizmoDebug>().GetComponent <GizmoDebug>();
        CCScript         = GameObject.Find("CameraControl").GetComponent <CameraControl>();
        _characterAction = CharacterAction.None;
        gs               = GameState.GetInstance();
        //ameObject.Find("root").BroadcastMessage("Start");
        GameObject.Find("root").BroadcastMessage("Load");
//		thisTransform.Rotate(gs.GetVector3("PlayerRot"));
//		navi.Warp(gs.GetVector3("PlayerPos"));
//		targetLocation = transform.position = gs.GetVector3("PlayerPos");
    }
Esempio n. 3
0
    // Use this for initialization
    void Start()
    {
        gd = GameObject.FindObjectOfType<GizmoDebug>().GetComponent<GizmoDebug>();

        player = GameObject.Find ("Player");
        triggers = GameObject.FindGameObjectsWithTag ("CameraZone");
        interactObjs = GameObject.FindObjectsOfType<interactuable> ();
    }
Esempio n. 4
0
 void Start()
 {
     // Cache component lookups at startup instead of every frame
     thisTransform = transform;
     cam = Camera.main;
     navi = GetComponent<NavMeshAgent>();
     _inventory = GetComponent<InventoryControl>();
     gd = GameObject.FindObjectOfType<GizmoDebug>().GetComponent<GizmoDebug>();
     CCScript = GameObject.Find("CameraControl").GetComponent<CameraControl>();
     _characterAction = CharacterAction.None;
     gs = GameState.GetInstance();
     //ameObject.Find("root").BroadcastMessage("Start");
     GameObject.Find("root").BroadcastMessage("Load");
     //		thisTransform.Rotate(gs.GetVector3("PlayerRot"));
     //		navi.Warp(gs.GetVector3("PlayerPos"));
     //		targetLocation = transform.position = gs.GetVector3("PlayerPos");
 }