예제 #1
0
    List <GameObject> friends = new List <GameObject>(); //好友列表

    void Start()                                         //是函数,启动时我们只执行一次,里面的循环体不受影响
    {
        //Debug.Log("到主界面:");
        friendPrefb   = (GameObject)Resources.Load("Prefabs/MMenu/FriendProb"); //动态加载好友预制件
        msgCount_preb = (GameObject)Resources.Load("Prefabs/MMenu/msgCount");   //msgCount_preb预制件
        rank_preb     = (GameObject)Resources.Load("Prefabs/MMenu/Rank_item");  //排行榜预制件加载
        RankCommand.Rank_Send();                                                //获取排行榜命令
        DisplayMyInfo();

        myInfo_B.onClick.AddListener(() => {
            GameAudio.instance.PlayAudioSourceUI("click_btn");
            InfoPanel infoPanel = InfoPanel.Open();
            infoPanel.Initialize(NetStart.myInfo);
        });//转到个人的详细信息界面

        creatRoom_B.onClick.AddListener(() => {
            GameAudio.instance.PlayAudioSourceUI("click_btn");
            //执行查找房间命令
            RoomCommand.SelectRooms();
            MMunePanel.Close();
            RoomsHallPanel.Open();
        });

        msgCount_B.onClick.AddListener(() => ToChatPanel(null));

        setting_B.onClick.AddListener(() => {
            GameAudio.instance.PlayAudioSourceUI("click_btn");
            SettingPanel.Open();
        });
        store_B.onClick.AddListener(() => {
            GameAudio.instance.PlayAudioSourceUI("click_btn");
            //Close();
        });
        SelectFriendCommand.SelectFriendList();
    }
예제 #2
0
 private Rank BindRank(RankCommand rank)
 {
     return(new Rank
     {
         Code = rank.Code,
         Rating = rank.Rating,
         RestaurantId = rank.RestaurantId
     });
 }
예제 #3
0
        public IActionResult Post([FromBody] RankCommand rank)
        {
            try
            {
                return(Ok(rankService.Insert(rank)));
            }
            catch { }

            return(BadRequest("Rank was not registered"));
        }
예제 #4
0
        protected override void OnViewLoaded(object view)
        {
            if (!context.Database.Exists())
            {
                IWindowManager            manager            = new WindowManager();
                DBInitializationViewModel dbInitializingView = new DBInitializationViewModel(context);
                manager.ShowDialog(dbInitializingView, null, null);
            }

            CreateButton          = CreateButton.Initialize();
            barrackCommand        = new BarrackCommand(CreateButton);
            teamCommand           = new TeamCommand(CreateButton);
            specializationCommand = new SpecializationCommand(CreateButton);
            rankCommand           = new RankCommand(CreateButton);
            permissionCommand     = new PermissionCommand(CreateButton);
            missionCommand        = new MissionCommand(CreateButton);
            equipmentCommand      = new EquipmentCommand(CreateButton);
            employeeCommand       = new EmployeeCommand(CreateButton);
            LoadBarrackPage();
        }
예제 #5
0
 /// <summary>
 /// 心跳包 查好友 查排行 发送
 /// </summary>
 void Refresh_Send()
 {
     if (isLogin)
     {
         if (Time.time - lastTime >= heartBeatTime)
         {
             HeartbeatCommand.Heartbeat_Send();//心跳包发送
             if (MMunePanel.Get())
             {
                 RankCommand.Rank_Send();                //获取查询排行的命令
                 SelectFriendCommand.SelectFriendList(); //查找所有好友
             }
             if (RoomsHallPanel.Get())
             {
                 RoomCommand.SelectRooms();//获取所有房间
             }
             //if (RoomPanel.Get())
             //{
             //    RoomCommand.RefreshThisRoomInfo(myInfo.roomNum);//刷新当前房间信息
             //}
             lastTime = Time.time;
         }
     }
 }
예제 #6
0
        public Rank Insert(RankCommand rank)
        {
            var _rank = BindRank(rank);

            return(repository.Insert(_rank));
        }