• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# PlayerProfile类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中PlayerProfile的典型用法代码示例。如果您正苦于以下问题:C# PlayerProfile类的具体用法?C# PlayerProfile怎么用?C# PlayerProfile使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PlayerProfile类属于命名空间,在下文中一共展示了PlayerProfile类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Player

		public Player(FightEngine engine, PlayerProfile profile, Team team)
			: base(engine)
		{
			if (profile == null) throw new ArgumentNullException("profile");
			if (team == null) throw new ArgumentNullException("team");

			m_profile = profile;
			m_spritemanager = Engine.GetSubSystem<Drawing.SpriteSystem>().CreateManager(Profile.SpritePath);
			m_animationmanager = Engine.GetSubSystem<Animations.AnimationSystem>().CreateManager(Profile.AnimationPath);
			m_soundmanager = Engine.GetSubSystem<Audio.SoundSystem>().CreateManager(Profile.SoundPath);
			m_statemanager = Engine.GetSubSystem<StateMachine.StateSystem>().CreateManager(this, Profile.StateFiles);
			m_commandmanager = Engine.GetSubSystem<Commands.CommandSystem>().CreateManager(Profile.CommandPath);
			m_constants = new PlayerConstants(this, Engine.GetSubSystem<IO.FileSystem>().OpenTextFile(Profile.ConstantsPath));
			m_dimensions = new CharacterDimensions(Constants);
			m_palettes = BuildPalettes();
			m_palettenumber = 0;
			m_power = 0;
			m_palfx = new PaletteFx();
			m_team = team;
			m_helpers = new Dictionary<Int32, List<Helper>>();

			if (Engine.GetSubSystem<InitializationSettings>().PreloadCharacterSprites == true)
			{
				SpriteManager.LoadAllSprites();
			}

			SpriteManager.UseOverride = true;

			SetLocalAnimation(0, 0);

			CurrentScale = Constants.Scale;
			PushFlag = true;
		}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:33,代码来源:Player.cs


示例2: ShowScorePanel

		public void ShowScorePanel(PlayerProfile.PlayerProfile profile, FractionDifficulty? newDifficulty, bool playerHasWon)
		{
			btnPause.IsEnabled = false;
			btnSpeed.IsEnabled = false;

			GDOwner.GameSpeedMode = GameSpeedModes.NORMAL;

			AddElement(new HUDScorePanel(profile, newDifficulty, playerHasWon));
		} 
开发者ID:Mikescher,项目名称:GridDominance,代码行数:9,代码来源:GDGameHUD.cs


示例3: Clear

    public static void Clear()
    {
        if (current == null)
        {
            current = new PlayerProfile();

            PlayerPrefs.SetString("PlayerProfile", "");
            PlayerPrefs.Save();
        }
    }
开发者ID:azanium,项目名称:TruthNIslam-Unity,代码行数:10,代码来源:PlayerProfile.cs


示例4: InformationController

 public InformationController(InformationServiceClient service, 
         PlayerProfile profile, 
         PlayerStats stats, 
         List<GameInformation> gameList)
 {
     _service = service;
     this.stats = stats;
     this.profile = profile;
     this.gameList = gameList;
 }
开发者ID:emactaggart,项目名称:CS476,代码行数:10,代码来源:InformationController.cs


示例5: Save

    public static void Save()
    {
        if (current == null)
        {
            current = new PlayerProfile();
        }

        string xml = XmlManager.SerializeObject(typeof(PlayerProfile), current);
        PlayerPrefs.SetString("PlayerProfile", xml);
        PlayerPrefs.Save();
    }
开发者ID:azanium,项目名称:TruthNIslam-Unity,代码行数:11,代码来源:PlayerProfile.cs


示例6: PlayerSpawning

 public override void PlayerSpawning(ClientInfo _cInfo, int _chunkViewDim, PlayerProfile _playerProfile)
 {
     if (Motd.IsEnabled)
     {
         Motd.Send(_cInfo);
     }
     if (ClanManager.IsEnabled)
     {
         ClanManager.CheckforClantag(_cInfo);
     }
 }
开发者ID:dmustanger,项目名称:7dtd-ServerTools,代码行数:11,代码来源:Api.cs


示例7: HUDScorePanel

		public HUDScorePanel(PlayerProfile.PlayerProfile playerprofile, FractionDifficulty? newDifficulty, bool playerHasWon)
		{
			gainLevel = newDifficulty;
			successScreen = playerHasWon;
			profile = playerprofile;

			RelativePosition = FPoint.Zero;
			Size = new FSize(WIDTH, HEIGHT);
			Alignment = HUDAlignment.CENTER;
			Background = FlatColors.BackgroundHUD;
		}
开发者ID:Mikescher,项目名称:GridDominance,代码行数:11,代码来源:HUDScorePanel.cs


示例8: Launch

    // Use this for initialization
    public void Launch()
    {
        PROFILE = Resources.Load("Tuning/PlayerProfile") as PlayerProfile;
        SETUP = Resources.Load("Tuning/GameSetup") as GameSetup;
        INPUT = Resources.Load("Tuning/InputManager") as InputManager;
        DontDestroyOnLoad(this);

        GameEventManager.GameStart += GameStart;
        GameEventManager.GameOver += GameOver;
        GameEventManager.Respawn += Respawn;
        GameEventManager.EndGame += EndGame;
    }
开发者ID:Tavrox,项目名称:Lavapools,代码行数:13,代码来源:PlayerData.cs


示例9: Start

	// Use this for initialization
	void Start () {
		profile = GetComponent<PlayerProfile>();
		Levels= GetComponentsInChildren<LevelItemController>();
		int total = 0;
		foreach(LevelItemController level in Levels)
		{
			level.LevelSelector = this;
			total+=profile.GetProfitForLevel(level.SceneName);
		}

		TotalProfit.Value = total;

	}
开发者ID:PentagramPro,项目名称:HouseCraft,代码行数:14,代码来源:LevelSelectorController.cs


示例10: Program

        static Program()
        {
            var profile = new PlayerProfile();
            var stats = new PlayerStats();
            var gameList = new List<GameInformation>();
            var gameService = new GameServiceClient();
            var infoService = new InformationServiceClient();
            var state = new BasicObservable<MatchState>(new MatchState());
            infoController = new InformationController(infoService, profile, stats, gameList);
            gameController = new GameController(gameService, state);

            infoController.GetGameList();
        }
开发者ID:emactaggart,项目名称:CS476,代码行数:13,代码来源:Program.cs


示例11: Load

    public static void Load()
    {
        if (current == null)
        {
            current = new PlayerProfile();
        }

        string xml = PlayerPrefs.GetString("PlayerProfile");
        if (string.IsNullOrEmpty(xml.Trim()) == false)
        {
            //Debug.Log(xml);
            current = (PlayerProfile)XmlManager.DeserializeObject(typeof(PlayerProfile), xml);
        }
    }
开发者ID:azanium,项目名称:TruthNIslam-Unity,代码行数:14,代码来源:PlayerProfile.cs


示例12: PlayerInformation

    public PlayerInformation()
    {
		NakedArmorInventory = new Inventory();
        MainInventory = new Inventory();
		ArmoryInventory = new Inventory();
		jukeBox = new Jukebox();
		playerShopInventory = new Inventory();
        Equip = new Equipment();
		questLog = new QuestLog();
		profile = new PlayerProfile();
		playerData = new ParseObject("PlayerData");
		parseObjectID = " ";
		PlayerName = " ";
	}
开发者ID:reaganq,项目名称:MagnetBots_unity,代码行数:14,代码来源:PlayerInformation.cs


示例13: EngineInitialization

		public EngineInitialization(CombatMode mode, PlayerProfile p1, Int32 p1palette, PlayerProfile p2, Int32 p2palette, StageProfile stage, Int32 seed)
		{
			if (mode == CombatMode.None) throw new ArgumentOutOfRangeException("mode");
			if (p1 == null) throw new ArgumentNullException("p1");
			if (p1palette < 0 || p1palette > 11) throw new ArgumentOutOfRangeException("p1palette");
			if (p2 == null) throw new ArgumentNullException("p2");
			if (p2palette < 0 || p2palette > 11) throw new ArgumentOutOfRangeException("p2palette");
			if (stage == null) throw new ArgumentNullException("stage");

			m_mode = mode;
			m_p1 = new PlayerCreation(p1, p1.GetValidPaletteIndex(p1palette));
			m_p2 = new PlayerCreation(p2, p2.GetValidPaletteIndex(p2palette));
			m_stage = stage;
			m_seed = seed;
		}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:15,代码来源:EngineInitialization.cs


示例14: RequestToSpawnPlayer

        public static void RequestToSpawnPlayer(ClientInfo _cInfo, int _chunkViewDim, PlayerProfile _playerProfile)
        {
            try {
                Log.Out ("Player connected" +
                    ", entityid=" + _cInfo.entityId +
                    ", name=" + _cInfo.playerName +
                    ", steamid=" + _cInfo.playerId +
                    ", ip=" + _cInfo.ip
                );

                PersistentContainer.Instance.Players [_cInfo.playerId, true].SetOnline (_cInfo);
                PersistentData.PersistentContainer.Instance.Save ();
            } catch (Exception e) {
                Log.Out ("Error in AllocsLogFunctions.RequestToSpawnPlayer: " + e);
            }
        }
开发者ID:Ketchu13,项目名称:7dtd_Server-Fixes,代码行数:16,代码来源:AllocsLogFunctions.cs


示例15: Init

    public void Init()
    {
        this.TargetableObjects = new List<GameTarget>();

        this._playerOneProfile = new PlayerProfile();
        this._playerTwoProfile = new PlayerProfile();
        this._playerOneGeneral.Setup(new CardGameGeneral(13805062));
        this._playerTwoGeneral.Setup(new CardGameGeneral(1813937494));

        Debug.Log("Adding the two generals to the target list");
        this.TargetableObjects.Add(new GameTarget(Enumerations.Player.PlayerOne, this._playerOneGeneral));
        this.TargetableObjects.Add(new GameTarget(Enumerations.Player.PlayerTwo, this._playerTwoGeneral));

        DisplayCards();

        //Hide the Card Profile
        HideCardProfile();
    }
开发者ID:Scoots,项目名称:HeroGame,代码行数:18,代码来源:OrbBattle.cs


示例16: PlayerProfile

            public PlayerProfile(PlayerProfile player) {
                /* shallow copy */
                updateInfo(player.info);
                pbinfo = player.pbinfo;
                name = player.name;
                plugin = player.plugin;
                stats = player.stats;
                state = player.state;
                qmsg = player.qmsg;
                tag = player.tag;
                time = player.time;
                random_value = player.random_value;

                last_kill = player.last_kill;
                last_death = player.last_death;
                last_spawn = player.last_spawn;
                last_chat = player.last_chat;
                last_score = player.last_score;

                savedTeamId = player.savedTeamId;
                savedSquadId = player.savedSquadId;

                targetTeamId = player.targetTeamId;
                targetSquadId = player.targetSquadId;

                delayedTeamId = player.delayedTeamId;
                delayedSquadId = player.delayedSquadId;
            }
开发者ID:ratdart,项目名称:Procon-1,代码行数:28,代码来源:InsaneBalancer.cs


示例17: isPlayerIdle

        private bool isPlayerIdle(PlayerProfile player) {
            int last_kill_time = getIntegerVarValue("last_kill_time");
            int last_death_time = getIntegerVarValue("last_death_time");
            int last_chat_time = getIntegerVarValue("last_chat_time");
            int last_spawn_time = getIntegerVarValue("last_spawn_time");
            int last_score_time = getIntegerVarValue("last_score_time");


            if (player.getLastKill() > last_kill_time &&
                player.getLastDeath() > last_death_time &&
                player.getLastChat() > last_chat_time &&
                player.getLastSpawn() > last_spawn_time &&
                player.getLastScore() > last_score_time)
                return true;

            return false;

        }
开发者ID:ratdart,项目名称:Procon-1,代码行数:18,代码来源:InsaneBalancer.cs


示例18: KickPlayerWithMessage

        private void KickPlayerWithMessage(PlayerProfile player, string message) {
            if (player == null)
                return;

            player.state = PlayerState.kicked;
            this.ExecuteCommand("procon.protected.send", "admin.kickPlayer", player.name, message);
            if (players.ContainsKey(player.name))
                players.Remove(player.name);
        }
开发者ID:ratdart,项目名称:Procon-1,代码行数:9,代码来源:InsaneBalancer.cs


示例19: stats_fetching_loop

        public void stats_fetching_loop() {
            DebugWrite("Starting stats fetching thread", 1);
            getPlayerList();
            while (true) {
                if (new_player_queue.Count == 0) {
                    // if there are no more players, put yourself to sleep
                    DebugWrite("No new players, stats fetching thread going to sleep", 1);
                    wake_handle.Reset();
                    wake_handle.WaitOne();
                    DebugWrite("Stats fetching thread is now awake!", 1);
                }


                InsaneBalancer plugin = this;

                while (new_player_queue.Count > 0) {
                    if (!plugin_enabled)
                        break;

                    List<String> keys = new List<string>(new_player_queue.Keys);

                    String name = keys[keys.Count - 1];

                    CPunkbusterInfo info = null;
                    new_player_queue.TryGetValue(name, out info);

                    if (info == null)
                        continue;

                    // make sure I am the only one modifying these dictionarie at this time
                    lock (mutex) {
                        if (new_player_queue.ContainsKey(name))
                            new_player_queue.Remove(name);

                        if (!new_players_batch.ContainsKey(name))
                            new_players_batch.Add(name, null);
                    }

                    String msg = new_player_queue.Count + " more player" + ((new_player_queue.Count > 1) ? "s" : "") + " in queue";
                    if (new_player_queue.Count == 0)
                        msg = "no more players in queue";

                    plugin.DebugWrite("Getting battlelog stats for ^b" + name + "^n, " + msg, 1);
                    if (new_players_batch.ContainsKey(info.SoldierName))
                        new_players_batch[name] = new PlayerProfile(plugin, info);
                }

                // abort the thread if the plugin was disabled
                if (!plugin_enabled) {
                    plugin.DebugWrite("detected that plugin was disabled, aborting stats fetching thread", 1);
                    lock (mutex) {
                        new_player_queue.Clear();
                        new_players_batch.Clear();
                        scratch_list.Clear();
                    }
                    return;
                }

                DebugWrite("Done fetching stats, " + new_players_batch.Count + " player" + ((new_players_batch.Count > 1) ? "s" : "") + " in new batch, waiting for players list now", 1);
                scratch_handle.Reset();
                getPlayerList();
                scratch_handle.WaitOne();
                scratch_handle.Reset();
                lock (mutex) {
                    // remove the nulls, and the ones that left
                    List<String> players_to_remove = new List<string>();
                    foreach (KeyValuePair<String, PlayerProfile> pair in new_players_batch)
                        if (pair.Value == null || !scratch_list.Contains(pair.Key))
                            if (!players_to_remove.Contains(pair.Key)) {
                                DebugWrite("Looks like ^b" + pair.Key + "^n left, removing him from new batch", 3);
                                players_to_remove.Add(pair.Key);
                            }


                    // now remove them
                    foreach (String pname in players_to_remove)
                        if (new_players_batch.ContainsKey(pname))
                            new_players_batch.Remove(pname);

                    if (new_players_batch.Count > 0)
                        DebugWrite("Queue exhausted, will insert now a batch of " + new_players_batch.Count + " player" + ((new_players_batch.Count > 1) ? "s" : ""), 1);
                    foreach (KeyValuePair<String, PlayerProfile> pair in new_players_batch)
                        if (pair.Value != null && scratch_list.Contains(pair.Key))
                            plugin.players.Add(pair.Key, pair.Value);

                    new_players_batch.Clear();
                }

            }

        }
开发者ID:ratdart,项目名称:Procon-1,代码行数:91,代码来源:InsaneBalancer.cs


示例20: enforceImmediateMove

        private void enforceImmediateMove(PlayerProfile vp) {

            int dtid = vp.getDelayedTeamId();
            int dsid = vp.getDelayedSquadId();

            vp.resetDelayedTeamSquad();

            DebugWrite("Moving player " + vp + " from ^bTeam(" + TN(vp.getSavedTeamId()) + ").Squad(" + SQN(vp.getSavedSquadId()) + ")^n to ^bDTeam(" + TN(dtid) + ").DSquad(" + SQN(dsid) + ")^n", 3);
            movePlayer(vp, dtid, dsid);

        }
开发者ID:ratdart,项目名称:Procon-1,代码行数:11,代码来源:InsaneBalancer.cs



注:本文中的PlayerProfile类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# PlayerScript类代码示例发布时间:2022-05-24
下一篇:
C# PlayerPosition类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap