GetCamera() public method

public GetCamera ( ) : Transform
return Transform
Example #1
0
    public override void Execute(GameEvent gameEvent)
    {
        bool finished = false;
        Transform cam = gameEvent.GetCamera();
        GameObject actor = null;
        if(this.show3)
        {
            actor = (GameObject)gameEvent.spawnedPrefabs[this.actorID];
        }
        else
        {
            actor = gameEvent.actor[this.actorID].GetActor();
        }
        if(cam != null && actor != null)
        {
            CameraEventMover comp = (CameraEventMover)cam.gameObject.GetComponent("CameraEventMover");
            if(comp == null)
            {
                comp = (CameraEventMover)cam.gameObject.AddComponent("CameraEventMover");
            }

            if(this.show4)
            {
                Vector3 pos = cam.position;
                if(this.show5) pos = actor.transform.position;
                Quaternion rot = cam.rotation;
                if(this.show6) rot = actor.transform.rotation;
                float fov = cam.camera.fieldOfView;
                if(this.show7) fov = this.float1;
                comp.StartCoroutine(comp.SetTargetData(pos, rot, fov, cam, this.interpolate, this.time));
            }
            else
            {
                comp.StartCoroutine(comp.SetTargetData(DataHolder.CameraPosition(this.posID), cam, actor.transform, this.interpolate, this.time));
            }

            if(this.wait)
            {
                finished = true;
                gameEvent.StartTime(this.time, this.next);
            }
        }
        if(!finished)
        {
            gameEvent.StepFinished(this.next);
        }
    }
Example #2
0
 public override void Execute(GameEvent gameEvent)
 {
     bool finished = false;
     Transform cam = gameEvent.GetCamera();
     if(cam != null)
     {
         CameraEventMover comp = (CameraEventMover)cam.gameObject.GetComponent("CameraEventMover");
         if(comp == null)
         {
             comp = (CameraEventMover)cam.gameObject.AddComponent("CameraEventMover");
         }
         comp.StartCoroutine(comp.SetTargetData(gameEvent.initialCamPosition, gameEvent.initialCamRotation,
                 gameEvent.initialFieldOfView, cam, this.interpolate, this.time));
         if(this.wait)
         {
             finished = true;
             gameEvent.StartTime(this.time, this.next);
         }
     }
     if(!finished)
     {
         gameEvent.StepFinished(this.next);
     }
 }
Example #3
0
 public override void Execute(GameEvent gameEvent)
 {
     bool finished = false;
     Transform cam = gameEvent.GetCamera();
     if(cam)
     {
         CameraEventMover comp = (CameraEventMover)cam.gameObject.GetComponent("CameraEventMover");
         if(comp == null)
         {
             comp = (CameraEventMover)cam.gameObject.AddComponent("CameraEventMover");
         }
         comp.CameraShake(cam, this.time, this.intensity, this.speed);
         if(this.wait)
         {
             finished = true;
             gameEvent.StartTime(this.time, this.next);
         }
     }
     if(!finished)
     {
         gameEvent.StepFinished(this.next);
     }
 }
Example #4
0
 public override void Execute(GameEvent gameEvent)
 {
     Transform cam = gameEvent.GetCamera();
     GameObject actor = null;
     if(this.show3)
     {
         actor = (GameObject)gameEvent.spawnedPrefabs[this.actorID];
     }
     else
     {
         actor = gameEvent.actor[this.actorID].GetActor();
     }
     if(cam != null && actor != null)
     {
         if(this.show4)
         {
             if(this.show5) cam.position = actor.transform.position;
             if(this.show6) cam.rotation = actor.transform.rotation;
             if(this.show7) cam.camera.fieldOfView = this.float1;
         }
         else
         {
             DataHolder.CameraPosition(this.posID).Use(cam, actor.transform);
         }
     }
     gameEvent.StepFinished(this.next);
 }
Example #5
0
 public override void Execute(GameEvent gameEvent)
 {
     bool finished = false;
     Transform cam = gameEvent.GetCamera();
     GameObject actor = null;
     if(this.show3)
     {
         actor = (GameObject)gameEvent.spawnedPrefabs[this.actorID];
     }
     else
     {
         actor = gameEvent.actor[this.actorID].GetActor();
     }
     if(cam != null && actor != null)
     {
         CameraEventMover comp = (CameraEventMover)cam.gameObject.GetComponent("CameraEventMover");
         if(comp == null)
         {
             comp = (CameraEventMover)cam.gameObject.AddComponent("CameraEventMover");
         }
         comp.CameraRotate(cam, actor.transform, this.v3, this.time, this.speed);
         if(this.wait)
         {
             finished = true;
             gameEvent.StartTime(this.time, this.next);
         }
     }
     if(!finished)
     {
         gameEvent.StepFinished(this.next);
     }
 }