本文整理汇总了C#中Party.Tap方法的典型用法代码示例。如果您正苦于以下问题:C# Party.Tap方法的具体用法?C# Party.Tap怎么用?C# Party.Tap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Party
的用法示例。
在下文中一共展示了Party.Tap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Battle
public Battle(Party playerParty, Party enemyParty, Encounter overworldEncounter)
{
if (playerParty == null)
throw new Exception("Party playerParty cannot be null");
if (enemyParty == null)
throw new Exception("Party enemyParty cannot be null");
PlayerParty = playerParty.Tap(party => party.StartBattle(this));
EnemyParty = enemyParty.Tap(party => party.StartBattle(this));
states = new Stack<BattleState>();
states.Push(new BattleStates.Intro(this));
stateChanged = true;
OverworldEncounter = overworldEncounter;
Camera = new Camera(Game1.ScreenSize);
Camera.Position = Camera.Size / 2.0f;
cameraUpdateDelay = 0.0f;
RepositionPartyMembers();
updateCamera();
Camera.Scale = Camera.TargetScale;
updateCamera();
Camera.Position = Camera.TargetPosition;
generateBackground();
generateBackgroundScenery();
generateFloorScenery();
whitePixelTextureData = ResourceManager.GetTextureData("white_pixel");
arrowTextureData = ResourceManager.GetTextureData("arrow_down");
CharacterClassHeadTextureData = new Dictionary<CharacterClass, TextureData> {
{ CharacterClass.Warrior, ResourceManager.GetTextureData("battle_ui/warrior_head") },
{ CharacterClass.Marksman, ResourceManager.GetTextureData("battle_ui/marksman_head") },
{ CharacterClass.Medic, ResourceManager.GetTextureData("battle_ui/medic_head") },
{ CharacterClass.Thief, ResourceManager.GetTextureData("battle_ui/thief_head") }
};
keyboardButtonTextureData = ResourceManager.GetTextureData("battle_ui/buttons/key");
gamepadButtonTextureData = new Dictionary<InputButton, TextureData> {
{ InputButton.A, ResourceManager.GetTextureData("battle_ui/buttons/gamepad_a") },
{ InputButton.B, ResourceManager.GetTextureData("battle_ui/buttons/gamepad_b") },
{ InputButton.LeftTrigger, ResourceManager.GetTextureData("battle_ui/buttons/gamepad_lt") }
};
BorderTextureData = new TextureData[Directions.Length];
for (int i = 0; i < Directions.Length; ++i)
BorderTextureData[i] = ResourceManager.GetTextureData("battle_ui/borders/" + Directions[i]);
PlayerPartyItemsUsed = 0;
LastUsedThinkActionTypes = new ConditionalWeakTable<PartyMember, Wrapper<BattleStates.ThinkActionType>>();
}