Esempio n. 1
0
    // cmd

    public void CmdEnter(float time, PlayerInfo info, float size,
                         PlayerInfo[] infos,
                         ValuePoint[] ps)
    {
        game.callId = info.id;

        ActorClient a = actors[info.id];

        self = a;

        camerFollow     = Camera.main.GetComponent <FollowObj>();
        camerFollow.obj = a.obj;

        worldSize = size;

        for (int i = 0; i < infos.Length; i++)
        {
            CmdActorAppear(infos[i]);
        }

        for (int i = 0; i < ps.Length; i++)
        {
            CmdAddPoint(ps[i]);
        }
    }
Esempio n. 2
0
 public void InitCamPos()
 {
     if (FollowObj == null)
     {
         return;
     }
     lookatNow = lookatWant = FollowObj.TransformPoint(lookatAdd);
     eyeNow    = eyeWant = CalcEyeByLookatYPD(yaw, pitch, distance, lookatWant);
     this.transform.position = eyeNow;
     this.transform.LookAt(lookatNow, Vector3.up);
     this.GetComponent <Camera>().fieldOfView = fov;
 }
Esempio n. 3
0
    public void InitCamPos()
    {
        cam = clientmain.getMainCamera().gameObject;

        eyeNow = eyeWant = CalcEyeByLookatYPD(yaw, pitch, distance, lookatWant);
        cam.transform.position = eyeNow;
        cam.transform.LookAt(lookatNow, Vector3.up);
        cam.GetComponent <Camera>().fieldOfView = fov;
        if (FollowObj == null)
        {
            return;
        }
        lookatNow = lookatWant = FollowObj.TransformPoint(lookatAdd);
    }