Esempio n. 1
0
        //设置我自己相关信息
        private void SetMyInfo()
        {
            FriendLogic logic      = FriendLogic.getInstance();
            ArrayList   friendList = logic.GetFriendList(); //好友集合
            ArrayList   enemyList  = logic.getEnemyList();  //敌人集合
            //设置我image
            MajorPlayer majorPlayer = PlayerManager.GetInstance().MajorPlayer;

            imageSign.atlas = headAtlas;
            KGender gender = EnumUtils.GetEnumIns <KGender>(majorPlayer.Gender);

            if (gender == KGender.gFemale)
            {
                imageSign.spriteName = "女主";
            }
            else
            {
                imageSign.spriteName = "男主";
            }
            //show my nickname level
            nameLab.text  = majorPlayer.PlayerName;
            levelLab.text = "等级:" + majorPlayer.level;
            //show my sort
            sortLab.text = "我的好友 [" + friendList.Count + "/" + logic.Friend_MaxNum + "]       你等级排名:100";
        }
Esempio n. 2
0
        public AccountController(IConfiguration config, IHostingEnvironment environment)
        {
            _accountLogic = new AccountLogic(config);

            _friendLogic = new FriendLogic(config);

            _hostingEnvironment = environment;
        }
Esempio n. 3
0
        public ActionResult DeleteFriend(String friendUsername)
        {
            User u      = gc.getUserFromIdentity(User);
            User friend = gc.GetUser(friendUsername);

            FriendLogic.DeleteFriend(u, friend, gc);
            return(RedirectToAction("Friends"));
        }
Esempio n. 4
0
        public ActionResult CancelRequest(String friendUsername)
        {
            User u      = gc.getUserFromIdentity(User);
            User friend = gc.GetUser(friendUsername);

            FriendLogic.CancelFriendRequest(u, friend, gc);
            return(RedirectToAction("Friends"));
        }
Esempio n. 5
0
        private void createFriendLab()
        {
            FriendLogic logic      = FriendLogic.getInstance();
            FriendInfo  info       = null;
            ArrayList   friendList = logic.GetFriendList(); //好友集合

            image   = new UISprite[friendList.Count];       //好友头像
            infoLab = new UILabel[friendList.Count];        //好友介绍
            infoBg  = new UISprite[friendList.Count];       //好友背景
            for (int i = 0; i < friendList.Count; i++)
            {
                info     = friendList[i] as FriendInfo;
                image[i] = NGUITools.AddChild <UISprite>(GameObject.Find("friend"));
                image[i].transform.localPosition = new Vector3(-170.3591f, -35.93111f + (-55) * i, 0);
                image[i].transform.localScale    = new Vector3(1, 1, 1);
                image[i].atlas  = headAtlas;
                image[i].width  = 46;
                image[i].height = 44;
                if (info.sex == KGender.gFemale)
                {
                    image[i].spriteName = "女主";
                }
                else
                {
                    image[i].spriteName = "男主";
                }
                image[i].depth = 10 + i;

                //先设置label
                infoLab[i] = NGUITools.AddChild <UILabel>(GameObject.Find("friend"));
                infoLab[i].transform.localPosition = new Vector3(-140f, -35.93111f + (-55) * i, 0);
                infoLab[i].font = FontManager.GetInstance().Font;
                infoLab[i].text = info.nickName + "   " + info.level + "级";
                infoLab[i].transform.localScale = new Vector3(1, 1, 1);
                infoLab[i].pivot = UIWidget.Pivot.BottomLeft;
                infoLab[i].depth = 30 + i;
                infoLab[i].MakePixelPerfect();

                infoBg[i] = NGUITools.AddChild <UISprite>(GameObject.Find("friend"));
                infoBg[i].transform.localPosition = new Vector3(-140f, -35.93111f + (-55) * i, 0);
                infoBg[i].transform.localScale    = new Vector3(1, 1, 1);
                infoBg[i].pivot      = UIWidget.Pivot.BottomLeft;
                infoBg[i].atlas      = friendAtlas;
                infoBg[i].spriteName = "friendbg";
                infoBg[i].width      = infoLab[i].width;
                infoBg[i].height     = infoLab[i].height;
                infoBg[i].depth      = 20 + i;
            }
        }
Esempio n. 6
0
        public ActionResult Friends()
        {
            if (!User.Identity.IsAuthenticated)
            {
                return(View("NotAuthorized"));
            }

            User u = gc.getUserFromIdentity(User);

            String[] friends = FriendLogic.getFriends(u, gc);
            String[] pendingFriendRequests = FriendLogic.getFriendRequestNotifications(u, gc);

            InvitationViewModel vm = new InvitationViewModel(pendingFriendRequests, friends, GameInvitationLogic.getGameInvitationNotifications(u, gc));

            return(View(vm));
        }
Esempio n. 7
0
 //增加仇人
 private void OnAddEnemy(ulong roleID, string roleName, int roleLevel, bool onLine)
 {
     FriendLogic.getInstance().OnAddEnemy(roleID, roleName, roleLevel, onLine);
 }
Esempio n. 8
0
 //增加好友申请消息
 private void OnAddApplyFriendMsg(ulong senderID, string nickName, int level)
 {
     FriendLogic.getInstance().OnAddApplyFirendMsg(senderID, nickName, level);
 }
Esempio n. 9
0
 //仇人达到上限
 private void OnMaxEnemyNotify()
 {
     FriendLogic.getInstance().OnMaxEnemyNotify();
 }
Esempio n. 10
0
 //删除好友
 private void OnRemoveFriend(ulong friendID)
 {
     FriendLogic.getInstance().OnRemoveFriend(friendID);
 }
Esempio n. 11
0
 //提示已经是好友
 private void OnAlreadyMyFriend(string friendName)
 {
     FriendLogic.getInstance().OnAlreadyMyFriend(friendName);
 }
Esempio n. 12
0
 //private void OnHeartBeat(int nCurFrame, ulong uid, RemoteTable tab)
 //{
 //    log.Debug("xxxxxxxx" + uid + "   "+ nCurFrame + tab[1] + tab["xxx"]);
 //}
 //增加好友
 private void OnAddFriend(ulong friendID, string friendName, int friendLevel, bool onLine)
 {
     FriendLogic.getInstance().OnAddFriend(friendID, friendName, friendLevel, onLine);
 }
Esempio n. 13
0
 //同步仇人的等级
 private void OnUpdateEnemyLevel(ulong roleID, int roleLevel)
 {
     FriendLogic.getInstance().OnUpdateEnemyLevel(roleID, roleLevel);
 }
Esempio n. 14
0
 //同步好友
 private void OnSyncFriends(RemoteTable tab)
 {
     FriendLogic.getInstance().OnSyncFriends(tab);
 }
Esempio n. 15
0
 //提示已经是我仇人
 private void OnAlreadyMyEnemy(string enemyName)
 {
     FriendLogic.getInstance().OnAlreadyMyEnemy(enemyName);
 }
Esempio n. 16
0
 //删除仇人
 private void OnRemoveEnemy(ulong roleID)
 {
     FriendLogic.getInstance().OnRemoveEnemy(roleID);
 }
Esempio n. 17
0
        public TimelineController(IConfiguration config)
        {
            _postLogic = new PostLogic(config);

            _friendLogic = new FriendLogic(config);
        }
Esempio n. 18
0
 //同步仇人在线状态
 private void OnEnemyOnLineStatus(ulong roleID, bool status)
 {
     FriendLogic.getInstance().OnEnemyOnLineStatus(roleID, status);
 }