Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using System;
  4.  
  5. public class PlayerControl : MonoBehaviour {
  6.  
  7. public event EventHandler MoveComplete;
  8.  
  9. // Use this for initialization
  10. void Start () {
  11.  
  12. }
  13.  
  14. // Update is called once per frame
  15. void Update () {
  16. if (Input.GetMouseButtonUp(0)) {
  17. // Test logic for PlayerMoveComplete
  18. PlayerMoveComplete();
  19. }
  20. }
  21.  
  22. void PlayerMoveComplete()
  23. {
  24. if (MoveComplete != null) {
  25. MoveComplete(this, EventArgs.Empty);
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement