コード例 #1
0
        public void Set(bl_PlayerSelectorInfo info, bl_PlayerSelector script)
        {
            Info = info;
            PlayerPreview.sprite = info.Preview;
            PlayerNameText.text  = string.Format("<b>NAME:</b> {0}", info.Name.ToUpper());
            Selector             = script;
            if (info.Prefab != null)
            {
                bl_PlayerHealthManager   pdm = info.Prefab.GetComponent <bl_PlayerHealthManager>();
                bl_FirstPersonController fpc = info.Prefab.GetComponent <bl_FirstPersonController>();

                HealthText.fillAmount       = pdm.health / 125;
                SpeedText.fillAmount        = fpc.WalkSpeed / 5;
                RegenerationText.fillAmount = pdm.RegenerationSpeed / 5;
                NoiseText.fillAmount        = 0.9f;
            }
#if SHOP && ULSP
            if (info.Price > 0 && bl_DataBase.Instance != null)
            {
                int  pID    = bl_PlayerSelectorData.Instance.GetPlayerID(info.Name);
                bool unlock = bl_DataBase.Instance.LocalUser.ShopData.isItemPurchase(ShopItemType.PlayerSkin, pID);
                LockedUI.SetActive(!unlock);
            }
            else
            {
                LockedUI.SetActive(false);
            }
#else
            LockedUI.SetActive(false);
#endif
        }
コード例 #2
0
        public void SetUp(bl_PlayerSelectorInfo info, Team team)
        {
            UITeam                = team;
            TeamNameText.text     = team.GetTeamName().ToUpper();
            OperatorNameText.text = info.Name.ToUpper();
            PreviewImage.sprite   = info.Preview;
            bool fav = (team == bl_PlayerSelectorData.GetFavoriteTeam());

            FavButton.SetActive(!fav);
            FavUI.SetActive(fav);
        }
コード例 #3
0
        /// <summary>
        ///
        /// </summary>
        void InitialSetUp()
        {
            int team1op = bl_PlayerSelectorData.GetTeamOperatorID(Team.Team1);
            int team2op = bl_PlayerSelectorData.GetTeamOperatorID(Team.Team2);

            Team1PlayerInfo = bl_PlayerSelectorData.Instance.GetPlayerByIndex(team1op);
            Team2PlayerInfo = bl_PlayerSelectorData.Instance.GetPlayerByIndex(team2op);

            TeamsUI[0].SetUp(Team1PlayerInfo, Team.Team1);
            TeamsUI[1].SetUp(Team2PlayerInfo, Team.Team2);
        }
コード例 #4
0
        public List <bl_PlayerSelectorInfo> GetPlayerList(Team team)
        {
            List <bl_PlayerSelectorInfo> list = new List <bl_PlayerSelectorInfo>();
            List <int> ids = team == Team.Team1 ? Team1Players : Team2Players;

            for (int i = 0; i < ids.Count; i++)
            {
                bl_PlayerSelectorInfo info = AllPlayers[ids[i]];
                info.ID   = ids[i];
                info.team = team;
                list.Add(info);
            }
            return(list);
        }
コード例 #5
0
        public void SelectOperator(bl_PlayerSelectorInfo operatorInfo)
        {
            bl_PlayerSelectorData.SetTeamOperator(operatorInfo.ID, operatorInfo.team);
            OnShowUpOp(operatorInfo);
            Team t = operatorInfo.team;

            TeamsUI[((int)t - 1)].SetUp(bl_PlayerSelectorData.Instance.GetPlayerByIndex(operatorInfo.ID), t);
            if (t == Team.Team1)
            {
                Team1PlayerInfo = operatorInfo;
            }
            else
            {
                Team2PlayerInfo = operatorInfo;
            }
        }
コード例 #6
0
        public void SetUp(bl_PlayerSelectorInfo info, bl_PlayerSelectorLobby manager)
        {
            Manager             = manager;
            cacheInfo           = info;
            PreviewImage.sprite = info.Preview;
            SelectedUI.SetActive(info.isEquipedOne());
#if SHOP && ULSP
            if (info.Price > 0 && bl_DataBase.Instance != null)
            {
                int  pID    = bl_PlayerSelectorData.Instance.GetPlayerID(info.Name);
                bool unlock = bl_DataBase.Instance.LocalUser.ShopData.isItemPurchase(ShopItemType.PlayerSkin, pID);
                isBlocked = !unlock;
                BlockedUI.SetActive(!unlock);
            }
            else
            {
                BlockedUI.SetActive(false);
            }
#else
            BlockedUI.SetActive(false);
#endif
        }
コード例 #7
0
        public void ShowUpSelectedOne(Team showingTeam)
        {
            bl_PlayerSelectorInfo player = showingTeam == Team.Team1 ? Team1PlayerInfo : Team2PlayerInfo;

            OnShowUpOp(player);
        }
コード例 #8
0
 public void OnShowUpOp(bl_PlayerSelectorInfo operatorInfo)
 {
     TeamNameSelectorText.text  = operatorInfo.team.GetTeamName().ToUpper();
     OperatorSelectorText.text  = operatorInfo.Name.ToUpper();
     OperatorSelectorImg.sprite = operatorInfo.Preview;
 }