示例#1
0
 // Use this for initialization
 void Start()
 {
     irc          = GameObject.Find("IRCManager").GetComponent <IRC> ();
     playerPrefab = Resources.Load("PlayerModels/Knight") as GameObject;
     spawnPoint   = GameObject.Find("SpawnPoint");
     profiles     = GameObject.Find("PlayerManager").GetComponent <PlayerProfiles> ();
 }
 public void AddPlayerScores(PlayerProfile profile, PlayerScoreData scoreData)
 {
     if (!PlayerProfiles.Contains(profile))
     {
         PlayerProfiles.Add(profile);
     }
     playerScoreMap[profile] = scoreData;
 }
示例#3
0
        public static CentralGumpProfile EnsureProfile(PlayerMobile pm)
        {
            if (pm == null)
            {
                return(null);
            }

            CentralGumpProfile p;

            if (!PlayerProfiles.TryGetValue(pm, out p))
            {
                PlayerProfiles.Add(pm, p = new CentralGumpProfile(pm));
            }
            else if (p == null)
            {
                PlayerProfiles[pm] = p = new CentralGumpProfile(pm);
            }

            return(p);
        }
 public static Sc2PlayerData FindProfile(string displayName)
 {
     return(PlayerProfiles.Find(x => x.DisplayName == displayName)
            ?? FriendsProfiles.Find(x => x.DisplayName == displayName));
 }
示例#5
0
        private void CheckReady()
        {
            if (m_isdone)
            {
                return;
            }
            if (m_stageselected == false || m_p1info.IsSelected == false)
            {
                return;
            }

            m_isdone = true;

            if (m_currentstage == -1)
            {
                m_currentstage = MenuSystem.GetSubSystem <Random>().NewInt(0, StageProfiles.Count - 1);
            }

            var p1index = m_p1info.CurrentCell.Y * m_gridsize.X + m_p1info.CurrentCell.X;

            var p1    = PlayerProfiles[p1index];
            var stage = StageProfiles[m_currentstage];

            var init = new Combat.EngineInitialization(CombatMode.Versus, p1.Profile, m_p1info.PaletteIndex, PlayerProfiles.First().Profile, 0, stage);

            MenuSystem.PostEvent(new Events.SetupCombat(init));
            MenuSystem.PostEvent(new Events.SwitchScreen(ScreenType.Versus));
        }