DrawEllipse() public method

public DrawEllipse ( float aWidth, float aHeight, Color fillColor ) : void
aWidth float
aHeight float
fillColor Color
return void
コード例 #1
0
 static int DrawEllipse(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 4);
         FairyGUI.GGraph   obj  = (FairyGUI.GGraph)ToLua.CheckObject <FairyGUI.GGraph>(L, 1);
         float             arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
         float             arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
         UnityEngine.Color arg2 = ToLua.ToColor(L, 4);
         obj.DrawEllipse(arg0, arg1, arg2);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #2
0
 static public int DrawEllipse(IntPtr l)
 {
     try {
         FairyGUI.GGraph self = (FairyGUI.GGraph)checkSelf(l);
         System.Single   a1;
         checkType(l, 2, out a1);
         System.Single a2;
         checkType(l, 3, out a2);
         UnityEngine.Color a3;
         checkType(l, 4, out a3);
         self.DrawEllipse(a1, a2, a3);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #3
0
        public static void UpdateSimulateTouch()
        {
            if (simulateTouchPoint == null)
            {
                GGraph holder = new GGraph();
                holder.SetSize(10, 10);
                holder.DrawEllipse(10, 10, Color.yellow);
                simulateTouchPoint          = GRoot._inst.AddChild(holder);
                simulateTouchPoint.position = new Vector2(Screen.width / 2f, Screen.height / 2f);
                simulateTouchPoint.visible  = simulateOn;
            }

            bool moved = false;

            if (Input.GetKey("w"))
            {
                simulateTouchPoint.position = simulateTouchPoint.position + Vector3.down * simulateTouchPointSpeed;
                moved = true;
            }

            if (Input.GetKey("s"))
            {
                simulateTouchPoint.position = simulateTouchPoint.position + Vector3.up * simulateTouchPointSpeed;
                moved = true;
            }

            if (Input.GetKey("a"))
            {
                simulateTouchPoint.position = simulateTouchPoint.position + Vector3.left * simulateTouchPointSpeed;
                moved = true;
            }

            if (Input.GetKey("d"))
            {
                simulateTouchPoint.position = simulateTouchPoint.position + Vector3.right * simulateTouchPointSpeed;
                moved = true;
            }

            if (moved && Input.GetKey("z"))
            {
                Stage.inst.onTouchMove.BubbleCall(new InputEvent()
                {
                    touchId = simulateTouchPointId, x = simulateTouchPoint.position.x, y = simulateTouchPoint.position.y
                });
            }


            if (Input.GetKeyDown("z"))
            {
                Stage.inst.AddTouchCount(1);
                Stage.inst.onTouchBegin.BubbleCall(new InputEvent()
                {
                    touchId = simulateTouchPointId, x = simulateTouchPoint.position.x, y = simulateTouchPoint.position.y
                });
            }

            if (Input.GetKeyUp("z"))
            {
                Stage.inst.AddTouchCount(-1);
                Stage.inst.onTouchEnd.BubbleCall(new InputEvent()
                {
                    touchId = simulateTouchPointId, x = simulateTouchPoint.position.x, y = simulateTouchPoint.position.y
                });
            }
        }