예제 #1
0
    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;
    }
예제 #2
0
    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;
    }
예제 #3
0
    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;
    }
예제 #4
0
 static void  AddEasyTouch4C()
 {
     GUIEasyTouchMenu.AddEasyTouch(true);
 }
예제 #5
0
 static void  AddEasyTouch4Java()
 {
     GUIEasyTouchMenu.AddEasyTouch(false);
 }