Exemplo n.º 1
0
    new void Update()
    {
        if (lookingTarget)
        {
            currentTarget = target;
        }
        else
        {
            currentTarget = this.gameObject;
        }

        iTween.MoveUpdate(this.gameObject, iTween.Hash("position", destination, "lookTarget", currentTarget, "time", 2f));

        if (state == CameraPathLerpState2.idle2)
        {
            destination = player.transform.position;
            posBase     = this.transform.position;
        }

        if (state == CameraPathLerpState2.moving2)
        {
            if (estado == "volver")
            {
                state = CameraPathLerpState2.idle2;
            }
            notifyFinishAction();
        }
    }
Exemplo n.º 2
0
 public void moveToOriginalPosition()
 {
     destination = player.transform.position;
     estado      = "volver";
     state       = CameraPathLerpState2.moving2;
 }
Exemplo n.º 3
0
 public void warpToMarker(int m)
 {
     destination = marker [m].transform.position;
     estado      = "ir";
     state       = CameraPathLerpState2.moving2;
 }
Exemplo n.º 4
0
 public void moveRelative(Vector3 rel)
 {
     destination = rel;
     state       = CameraPathLerpState2.moving2;
     estado      = "volver";
 }
Exemplo n.º 5
0
 new void Start()
 {
     destination = player.transform.position;
     state       = CameraPathLerpState2.idle2;
 }