示例#1
0
        public override void Frame(IUIDataManager uiDataManager, int frameTime)
        {
            base.Frame(uiDataManager, frameTime);

            IAutoValue auto = GetAuto(PrefabAuto);

            if (auto != null)
            {
                auto.Frame(frameTime);
            }
        }
示例#2
0
 protected override void InitialAutoValue(string field, IAutoValue auto)
 {
     if ("x" == field)
     {
         auto.SetValue(obj3D.x);
     }
     else if ("y" == field)
     {
         auto.SetValue(obj3D.y);
     }
     else if ("z" == field)
     {
         auto.SetValue(obj3D.z);
     }
     else if ("sx" == field)
     {
         //auto.SetValue(obj3D.scaleX);
     }
     else if ("sy" == field)
     {
         //auto.SetValue(obj3D.scaleY);
     }
     else if ("sz" == field)
     {
         //auto.SetValue(obj3D.scaleZ);
     }
     else if ("rx" == field)
     {
         auto.SetValue(obj3D.rotationX);
     }
     else if ("ry" == field)
     {
         auto.SetValue(obj3D.rotationY);
     }
     else if ("rz" == field)
     {
         auto.SetValue(obj3D.rotationZ);
     }
     else if ("r" == field)
     {
         auto.SetValue(((ISprite3D)obj3D).rotation);
     }
     else if ("per" == field)
     {
         auto.SetValue(per);
     }
 }
示例#3
0
 protected void InitialAutoValue(string field, IAutoValue auto)
 {
     if ("x" == field)
     {
         auto.SetValue(model3D.x);
     }
     else if ("y" == field)
     {
         auto.SetValue(model3D.y);
     }
     else if ("z" == field)
     {
         auto.SetValue(model3D.z);
     }
     else if ("sx" == field)
     {
         auto.SetValue(model3D.scaleX);
     }
     else if ("sy" == field)
     {
         auto.SetValue(model3D.scaleY);
     }
     else if ("sz" == field)
     {
         auto.SetValue(model3D.scaleZ);
     }
     else if ("rx" == field)
     {
         auto.SetValue(model3D.rotationX);
     }
     else if ("ry" == field)
     {
         auto.SetValue(model3D.rotationY);
     }
     else if ("rz" == field)
     {
         auto.SetValue(model3D.rotationZ);
     }
     if ("vi" == field)
     {
         auto.SetValue(!hide);
     }
 }
示例#4
0
 protected override void InitialAutoValue(string field, IAutoValue auto)
 {
     if (auto != null)
     {
         if (X == field)
         {
             auto.SetValue(this.x);
         }
         if (Y == field)
         {
             auto.SetValue(this.y);
         }
         if (WIDTH == field)
         {
             auto.SetValue(ToUI().width);
         }
         if (HEIGHT == field)
         {
             auto.SetValue(ToUI().height);
         }
         if (ALPHA == field)
         {
             auto.SetValue(ToUI().alpha * 1000);
         }
         if (ROTATION == field)
         {
             auto.SetValue(ToUI().rotation * 180 / Math.PI);
         }
         if (VISIBLE == field)
         {
             auto.SetValue(ToUI().visible);
         }
         if (AVATAR_POINT == field)
         {
             auto.SetValue(ToUI().x + "," + ToUI().y + "," + ToUI().rotation);
         }
         if (AVATAR_ROTATION == field)
         {
             auto.SetValue(ToUI().x + "," + ToUI().y + "," + ToUI().rotation);
         }
     }
 }
示例#5
0
        public List <MapFixedVector2> KongTouList()
        {
            int planeId = 0;

            kongTouList.Clear();

            FreeRenderObject plane = SingletonManager.Get <FreeEffectManager>().GetEffect("plane1");

            if (plane != null)
            {
                IAutoValue id = plane.GetAuto("id");
                if (id != null && id is AutoConstValue)
                {
                    planeId = int.Parse(((AutoConstValue)id).GetValue());

                    foreach (FreeRenderObject drop in SingletonManager.Get <FreeEffectManager>().FreeEffects.Values)
                    {
                        if (drop.key.StartsWith("dropBox"))
                        {
                            IAutoValue dropBoxId = drop.GetAuto("id");
                            if (dropBoxId != null && dropBoxId is AutoConstValue)
                            {
                                int realId = int.Parse(((AutoConstValue)dropBoxId).GetValue());
                                if (realId == planeId)
                                {
                                    kongTouList.Add(new MapFixedVector2(WorldOrigin.WorldPosition(new Vector3(drop.model3D.x, drop.model3D.y, drop.model3D.z)).To2D()));
                                }
                                //                        Debug.LogFormat("********************************** planeId:{0} dropId:{1}", planeId, realId);
                            }
                        }
                    }
                }
            }

            return(kongTouList);
        }
示例#6
0
 protected override void InitialAutoValue(string field, IAutoValue auto)
 {
 }
示例#7
0
 public AutoField(string field, IAutoValue auto)
 {
     this.field = field;
     this.auto  = auto;
 }
示例#8
0
 protected abstract void InitialAutoValue(string field, IAutoValue auto);