Beispiel #1
0
 void Start()
 {
     // Sækja króka í nauðsinlegar scriptur eða Game Objects
     IFGameObject = GameObject.FindGameObjectWithTag("Interface");
     SSM          = GameObject.FindGameObjectWithTag("GameController").GetComponent <SwitchSceneManager>();
     player       = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>();
     playerHand   = player.gameObject.GetComponent <Hand>();
 }
Beispiel #2
0
 void Start()
 {
     //Nær í componentana
     cam = GetComponentInChildren <Camera>();
     IF  = GameObject.FindGameObjectWithTag("Interface").GetComponent <Interface>();
     INV = IF.gameObject.GetComponentInChildren <Inventory>();
     Gun = IF.gameObject.GetComponentInChildren <GunController>();
     SSM = GameObject.FindGameObjectWithTag("GameController").GetComponent <SwitchSceneManager>();
 }
Beispiel #3
0
 void CustomStart()
 {
     cam = Camera.main;
     Debug.Log("Inventory loaded in new scene " + SceneManager.GetActiveScene().name);
     ItemD      = GameObject.FindGameObjectWithTag("GameController").GetComponent <ItemDatabase>();
     SSM        = ItemD.gameObject.GetComponent <SwitchSceneManager>();
     DropPoint  = GameObject.FindGameObjectWithTag("Drop").GetComponent <Transform>();
     HandScript = GameObject.FindGameObjectWithTag("Player").GetComponent <Hand>();
 }
Beispiel #4
0
 void Start()
 {
     SSM          = GameObject.FindGameObjectWithTag("GameController").GetComponent <SwitchSceneManager>();
     Anim         = GetComponent <Animator>();
     agent        = GetComponent <NavMeshAgent>();
     player       = GameObject.FindWithTag("Player").GetComponent <Transform>();
     PlayerScript = player.transform.GetComponent <Player>();
     thisCollider = GetComponent <CapsuleCollider>();
     ShootTime    = ShootInterval;
     GotoNextPoint(); //Ganga að næstu staðsetningu
 }
Beispiel #5
0
    void Start() //Er kyrr
    {
        GameManager          = GameObject.FindGameObjectWithTag("GameController");
        SSM                  = GameManager.GetComponent <SwitchSceneManager>();
        SSM.AlienInLastScene = true;
        ObjectiveScript      = GameManager.GetComponentInChildren <Objectives>();

        agent             = GetComponent <UnityEngine.AI.NavMeshAgent>();
        agent.destination = RunPos.position;
        agent.isStopped   = true;
    }