Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.95 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3.  
  4. public class Spreader : MonoBehaviour
  5. {
  6.     [SerializeField]
  7.     private float shift = 2f;
  8.     [SerializeField]
  9.     private Vector3 center;
  10.     private Vector3 globalCenter;
  11.     private Vector3 originPosition;
  12.     private Quaternion originRotation;
  13.     private Vector3 originPositionMove;
  14.     private Quaternion originRotationMove;
  15.     private Vector3 newPosition;
  16.     private Vector3 childOffset;
  17.     private Vector3 speed = Vector3.zero;
  18.     private Color objectColor;
  19.     private Color objectNewColor = Color.yellow;
  20.     Vector3 boundsCenter;
  21.     bool spread = false;
  22.     bool animating = false;
  23.     bool positionChanged = false;
  24.     [SerializeField]
  25.     private float smooth = 0.1f;
  26.  
  27.     void Start()
  28.     {
  29.         ...
  30.     }
  31.  
  32.     void Update()
  33.     {
  34.         ...
  35.     }
  36.     void OnMouseDrag()
  37.     {
  38.         ...
  39.     }
  40.  
  41.     private void OnMouseOver()
  42.     {
  43.         ...
  44.     }
  45.  
  46.     private void OnMouseExit()
  47.     {
  48.         ...
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement