Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        if (ownedByCurrentPlayer ()) {
            if (!coloredParent) {
                navPoint toColor = gameObject.transform.parent.gameObject.GetComponentInChildren<navPoint> ();
                if (toColor != null) {
                    toColor.playerColor = playerColor;
                    toColor.nameTag = nameTag;
                    toColor.playerTeam = teamNum;
                    toColor.refresh ();
                    coloredParent = true;
                }
            }

            if (mC == null && homingMissileObject != null) {
                mC = homingMissileObject.GetComponent<homingMissileScript> ();
            }
            if (tPT == null) {
                tPT = thirdPerson.GetComponent<thirdPersonTower> ();
                if (tPT != null && !isActive) {
                    tPT.shutDownControl ();
                }
            }
            if (fPT == null) {
                fPT = firstPerson.GetComponent<firstPersonTower> ();
            }
        }

        if (Input.GetKeyDown(KeyCode.K))
        {
            print("ASOUAHDOUAHDOUAHDOAUDH");
            manager.scrollFromTab();
        }
    }
Exemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     if(mC == null && homingMissileObject != null)
     {
         mC = homingMissileObject.GetComponent<homingMissileCamera>();
     }
     if(tPT == null)
     {
         tPT = thirdPerson.GetComponent<thirdPersonTower>();
         if(tPT != null && !isActive)
         {
             tPT.shutDownControl();
         }
     }
     if(fPT == null)
     {
         fPT = firstPerson.GetComponent<firstPersonTower>();
     }
 }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        if (transform.parent.networkView.viewID.owner != Network.player) {
            isActive = false;
        }

        tPT = thirdPerson.GetComponent<thirdPersonTower> ();
        fPT = firstPerson.GetComponent<firstPersonTower> ();
        if (tPT != null && !isActive) {
            tPT.shutDownControl ();
        }
        if(fPT != null && !isActive)
        {
            fPT.cleanUpOnExit();
        }
        if (isActive) {
            tPT.shutDownControl ();
            fPT.makeActive ();
        }
    }
Exemplo n.º 4
0
 //TODO Arlen: public yourMissileScript
 /*
  * Your script will need the following function calls:
  *
  * 		openMiniScreen()  - you can check out homingMissileCamera to see how I open it or I can copy and paste once you add
  * 		makeActive()   -  this means that the tower is losing camera control and the missile will handle all camera and inputs
  *
  *
  *
  * 		Your script will need a way to invoke this topLevelController.moveToFirstPerson or third person
  * 		I would recommend adding a public topLevelController variable so that upon creation we can just assign from here
  *
  * 		We can discuss control schemes for selecting different cameras later as well
  * 			I've removed my selection so that you can test with yours
  */
 // Use this for initialization
 void Start()
 {
     if(homingMissileObject != null)
     {
         mC = homingMissileObject.GetComponent<homingMissileCamera>();
     }
     tPT = thirdPerson.GetComponent<thirdPersonTower>();
     fPT = firstPerson.GetComponent<firstPersonTower>();
     if(tPT != null && !isActive)
     {
         tPT.shutDownControl();
     }
 }