NewSkeletonSpriteScript.cs 404 B

12345678910111213141516171819
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. public class NewSkeletonSpriteScript : MonoBehaviour {
  6. bool dragged = false;
  7. // Update is called once per frame
  8. void Update() {
  9. if (dragged) {
  10. transform.position = Input.mousePosition;
  11. }
  12. }
  13. internal void isDragged(bool value) {
  14. dragged = value;
  15. }
  16. }