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(); } }
public void moveToOriginalPosition() { destination = player.transform.position; estado = "volver"; state = CameraPathLerpState2.moving2; }
public void warpToMarker(int m) { destination = marker [m].transform.position; estado = "ir"; state = CameraPathLerpState2.moving2; }
public void moveRelative(Vector3 rel) { destination = rel; state = CameraPathLerpState2.moving2; estado = "volver"; }
new void Start() { destination = player.transform.position; state = CameraPathLerpState2.idle2; }