static void AddJoystick() { EasyTouch easyt = (EasyTouch)UnityEngine.GameObject.FindObjectOfType(typeof(EasyTouch)); if (easyt == null) { easyt = GUIEasyTouchMenu.AddEasyTouch(true).GetComponent <EasyTouch>(); } if (easyt.useBroadcastMessage) { easyt.isExtension = true; } UnityEngine.GameObject joy = new UnityEngine.GameObject("New joystick"); joy.AddComponent <EasyJoystick>(); Selection.activeGameObject = joy; }
static void AddButton() { EasyTouch easyt = (EasyTouch)UnityEngine.GameObject.FindObjectOfType(typeof(EasyTouch)); if (easyt == null) { easyt = GUIEasyTouchMenu.AddEasyTouch(true).GetComponent <EasyTouch>(); } if (easyt.useBroadcastMessage) { easyt.isExtension = true; } UnityEngine.GameObject butt = new UnityEngine.GameObject("New button"); butt.AddComponent <EasyButton>(); Selection.activeGameObject = butt; }
static void AddJoystick() { EasyTouch easyt = (EasyTouch)GameObject.FindObjectOfType(typeof(EasyTouch)); if (easyt == null) { GUIEasyTouchMenu.AddEasyTouch(true); } else { if (easyt.useBroadcastMessage) { easyt.joystickAddon = true; } } GameObject joy = new GameObject("New joystick"); joy.AddComponent <EasyJoystick>(); Selection.activeGameObject = joy; }
static void AddEasyTouch4C() { GUIEasyTouchMenu.AddEasyTouch(true); }
static void AddEasyTouch4Java() { GUIEasyTouchMenu.AddEasyTouch(false); }