コード例 #1
0
        public CCMenu()
        {
            position = new CCPoint();
            position.x = 0;
            position.y = 0;

            //this.addChild("btn_example", new CCMenuItemSprite());
        }
コード例 #2
0
 static public CCPoint Parse(string str)
 {
     try
     {
         string[] rgb = str.Split(',', ':', '_');
         CCPoint clr = new CCPoint();
         clr.x = float.Parse(rgb[0]);
         clr.y = float.Parse(rgb[1]);
         return clr;
     }
     catch
     {
         return null;
     }
 }
コード例 #3
0
 private void onFunctionBtnClick(object sender, EventArgs e)
 {
     if (mPropertyWidget.BindCCNode == null)
         return;
     CCPoint pt = mPropertyWidget.BindCCNode.position;
     if (pt == null)
     {
         pt = new CCPoint();
         mPropertyWidget.BindCCNode.position = pt;
     }
     if (sender == upbtn)
     {
         pt.y += 1;
     }else if (sender == downbtn)
     {
         pt.y -= 1;
     }else if (sender == leftbtn)
     {
         pt.x -= 1;
     }else if (sender == rightbtn)
     {
         pt.x += 1;
     }
     OnFreshClick(null, null);
 }