예제 #1
0
    // Use this for initialization

    void Start()
    {
        camFollowScript = Camera.main.GetComponent <CameraFollowBullet>();
        goGui           = GameObject.Find("GuiInput");
        leftVal         = goGui.transform.position.x;
        orgScreenRect   = new Rect(leftVal + 300.0f, Screen.height - 40.0f, 120.0f, 30.0f);
        angSpdObj       = goGui.GetComponent <AngleSpeedGUI>();
    }
예제 #2
0
    public void SwitchPlayer()
    {
        CameraFollowBullet camFollowScript = Camera.main.GetComponent <CameraFollowBullet>();

        nextPlayer();
        switchCamera(camFollowScript);
        //Check if the below line is an overhead......
        camFollowScript.enabled = true;
    }
예제 #3
0
 void switchCamera(CameraFollowBullet camFollowScript)
 {
     // This was the problematic statement. A slight overhead here but I think we ll not call this like Update()
     cPlayer = GameObject.Find(NetworkManager.onlinePlayers[currentPlayer]).transform;
     camFollowScript.player = cPlayer;
 }