Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class Spreader : MonoBehaviour
- {
- [SerializeField]
- private float shift = 2f;
- [SerializeField]
- private Vector3 center;
- private Vector3 globalCenter;
- private Vector3 originPosition;
- private Quaternion originRotation;
- private Vector3 originPositionMove;
- private Quaternion originRotationMove;
- private Vector3 newPosition;
- private Vector3 childOffset;
- private Vector3 speed = Vector3.zero;
- private Color objectColor;
- private Color objectNewColor = Color.yellow;
- Vector3 boundsCenter;
- bool spread = false;
- bool animating = false;
- bool positionChanged = false;
- [SerializeField]
- private float smooth = 0.1f;
- void Start()
- {
- ...
- }
- void Update()
- {
- ...
- }
- void OnMouseDrag()
- {
- ...
- }
- private void OnMouseOver()
- {
- ...
- }
- private void OnMouseExit()
- {
- ...
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement