Advertisement
Guest User

mobileuictrl

a guest
Oct 22nd, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. /// <summary>
  5. /// routes the mobile input to the correct methods in the PlayerCtrl script
  6. /// </summary>
  7. ///
  8.  
  9. public class MobileUICtrl : MonoBehaviour
  10. {
  11.  
  12. public GameObject player;
  13. PlayerCtrl playerCtrl;
  14.  
  15.  
  16. // Use this for initialization
  17. void Start()
  18. {
  19. playerCtrl = player.GetComponent<PlayerCtrl>();
  20.  
  21. }
  22.  
  23.  
  24. public void mobileMoveLeft()
  25. {
  26. playerCtrl.MobileMoveLeft();
  27. }
  28.  
  29. public void mobileMoveright()
  30. {
  31. playerCtrl.MobileMoveRight();
  32. }
  33.  
  34.  
  35. public void MobileStop()
  36. {
  37. playerCtrl.MobileStop();
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement