本文整理汇总了C#中PlayerProfile类的典型用法代码示例。如果您正苦于以下问题:C# PlayerProfile类的具体用法?C# PlayerProfile怎么用?C# PlayerProfile使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PlayerProfile类属于命名空间,在下文中一共展示了PlayerProfile类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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));
}
示例3: Clear
public static void Clear()
{
if (current == null)
{
current = new PlayerProfile();
PlayerPrefs.SetString("PlayerProfile", "");
PlayerPrefs.Save();
}
}
示例4: InformationController
public InformationController(InformationServiceClient service,
PlayerProfile profile,
PlayerStats stats,
List<GameInformation> gameList)
{
_service = service;
this.stats = stats;
this.profile = profile;
this.gameList = gameList;
}
示例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();
}
示例6: PlayerSpawning
public override void PlayerSpawning(ClientInfo _cInfo, int _chunkViewDim, PlayerProfile _playerProfile)
{
if (Motd.IsEnabled)
{
Motd.Send(_cInfo);
}
if (ClanManager.IsEnabled)
{
ClanManager.CheckforClantag(_cInfo);
}
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
示例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);
}
}
示例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 = " ";
}
示例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;
}
示例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);
}
}
示例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();
}