Advertisement
Frank84

GoKit Example

Jul 5th, 2012
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.60 KB | None | 0 0
  1. private TweenConfig turnWorldCameraTweenConfig;
  2.  
  3. private void Start()
  4. {
  5.     // For configs that you are going to resuse multiple times, save the config for max performance.
  6.     turnWorldCameraTweenConfig = new TweenConfig()
  7.         .eulerAngles(Vector3.zero)
  8.         .setEaseType(EaseType.CubicOut)
  9.         .onComplete(thisTween =>
  10.         {
  11.             CameraOrigin.rotation = Quaternion.identity;
  12.         });
  13. }
  14.  
  15. private void TurnWorld()
  16. {
  17.     // You can even edit the config later if you want.
  18.     // turnWorldCameraTweenConfig.eulerAngles(new Vector3(45.0f, 0.0f, 0.0f));
  19.    
  20.     Go.to(CameraTransform, cameraTurnTime, turnWorldCameraTweenConfig);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement