using System.Collections; using System.Collections.Generic; using UnityEngine; public class SkillWaterGunTest : MonoBehaviour { private WaterGunRotate rotate; private void Awake() { rotate = gameObject.GetComponent(); } private void OnGUI() { if (GUI.Button(new Rect(0, 0, 100, 50), "上")) { rotate.Up(); } if (GUI.Button(new Rect(0, 50, 100, 50), "下")) { rotate.Down(); } if (GUI.Button(new Rect(0, 100, 100, 50), "左")) { rotate.Left(); } if (GUI.Button(new Rect(0, 150, 100, 50), "右")) { rotate.Right(); } } }