示例#1
0
 public Player()
 {
     User = new tg_user();
     //Role = new view_role();
     Role   = new RoleItem();
     Scene  = new view_scene_user();
     Order  = new BusinessOrder();
     Bag    = new BagItem();
     Family = new tg_family_member();
     // PrisonPoint = new Prison_point();
     BlackList    = new List <long>();
     Position     = new Ninjutsu_position();
     moduleIds    = new List <int>();
     BusinessArea = new List <tg_user_area>();
     DamingLog    = new List <tg_daming_log>();
     Game         = new GameItem();
 }
示例#2
0
        ///// <summary>
        ///// 根据用户id查询场景信息
        ///// </summary>
        //public static void GetSceneUpdate(view_scene_user viewdata)
        //{
        //    var entity = FindByid(viewdata.id);
        //    if (entity != null)
        //    {
        //        entity.X = viewdata.X;
        //        entity.Y = viewdata.Y;
        //        entity.scene_id = viewdata.scene_id;
        //    }
        //    Update(entity);
        //}

        /// <summary>
        /// 更新场景的数据
        /// </summary>
        public static int GetSceneUpdate(view_scene_user viewscene)
        {
            return(Update(string.Format("x={0},y={1},scene_id={2},model_number ={3}", viewscene.X, viewscene.Y, viewscene.scene_id, viewscene.model_number),
                          string.Format(" id ={0}", viewscene.id)));
        }