forked from Bannerlord-Modding/Documentation
-
Notifications
You must be signed in to change notification settings - Fork 11
docs:(中世纪)比赛翻译 #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SparrowNAN
wants to merge
3
commits into
YiGu-Studio:docs
Choose a base branch
from
SparrowNAN:sparrow_0508_tournament_game
base: docs
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
docs:(中世纪)比赛翻译 #59
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # (中世纪的)比赛 - TournamentGame | ||
|
|
||
| 此类用于处理比赛的参与者和固有设置,要修改某些行为,可能需要一个`Harmony补丁` | ||
|
|
||
| 注意:此页面不完整,因此,如果您发现有关此主题的更多信息,请创建请求请求并添加到此不断增长的Modding文档中! | ||
|
|
||
| ## 可访问的方法 | ||
|
|
||
| > `protected TournamentGame(Town town, ItemObject prize = null)` | ||
|
|
||
| 在`AddTournament`和`CreateTournament`方法之后被调用的内部方法,用来设置奖品 | ||
|
|
||
| ## 可访问的属性 | ||
|
|
||
| |属性名|描述| | ||
| |--|--| | ||
| |public const int `ParticipantNumber`|参加人数,目前已硬编码为16,但可以修补| | ||
| |public Town `Town`|比赛所在地| | ||
| |public CampaignTime `CreationTime`|比赛的创建时间| | ||
| |public QualificationMode `Mode`|资格模式“TeamScore(团体得分)”或“ IndividualScore(个体得分)”均可更改| | ||
| |public virtual int `MaxTeamSize`|比赛每个阶段的团队人数上限| | ||
| |public virtual int `MaxTeamNumberPerMatch`|在比赛的每个阶段中,每场比赛的最大团队数| | ||
| |public ItemObject `Prize`|比赛的奖金| | ||
| |public virtual float `TournamentWinRenown`|赢得比赛赢得了声誉| | ||
| |public static List\<CharacterObject\> GetParticipantCharacters(Settlement `settlement`, int `maxParticipantCount`, bool `includePlayer` = true, bool `includeHeroes` = true )|此方法定义比赛开始时的参与者,在玩家参加比赛或模拟比赛时调用| | ||
| |public abstract TextObject GetMenuText()|加入比赛时,此方法定义菜单上的文本| | ||
| |public abstract void OpenMission(Settlement `settlement`, bool `isPlayerParticipating`)|在开始比赛/模拟时有玩家参与时调用此方法| | ||
| |public void PrepareForTournamentGame(bool `isPlayerParticipating`)|在开始比赛/模拟时有玩家参与时调用此方法| | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,11 @@ | ||
| # BasicCharacterObject | ||
|
|
||
| BasicCharacterObjects contain the deserialized information from the `npccharacters` XML file. This includes the BodyProperties, Equipment, Level, Skills, and Culture for each defined character. | ||
| `BasicCharacterObjects` 包含了 `npccharacters` XML 文件中的反序列化信息。每个被定义的角色有 `BodyProperties`, `Equipment`, `Level`, `Skills`, 和 `Culture` 信息。 | ||
|
|
||
| BasicCharacterObjects are used as the building blocks for [Agents](../mountandblade/agent.md). | ||
| `BasicCharacterObjects` 一般用来构建 [Agents](../mountandblade/agent.md) 的区块。 | ||
|
|
||
| You can use the [MBObjectManager](mbobjectmanager.md) to get a loaded BasicCharacterObject by using the following: | ||
| 你可以用 [MBObjectManager](mbobjectmanager.md) 来获取一个加载后的 `BasicCharacterObject` ,代码如下: | ||
|
|
||
| ```csharp | ||
| MBObjectManager.Instance.GetObject<BasicCharacterObject>("example_troop_id"); | ||
| ``` | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,22 @@ | ||
| # GameEntity | ||
|
|
||
| GameEntities are objects (entities) in the game. Examples include characters, buildings, trees, and horses to name a few. Every prop in the game is a GameEntity. | ||
| 游戏实体 `GameEntity` 指的是游戏里的对象\(或称之为实体\)。举几个例子:角色,建筑,树木,马匹……等等等等。凡是游戏里出现的每个物件都是一个游戏实体。 | ||
|
|
||
| GameEntities contain Meshes, Skeletons, PhysicsBodies, and ScriptComponents along with a variety of other things for each object in the game. | ||
| 每一个游戏实体,包含了:网格\(`Mesh`\),骨架\(`Skeleton`\),刚体\(`PhysicsBody`\),脚本组件\(`ScriptComponent`\)以及各种游戏里的对象附带的其他内容。 | ||
|
|
||
| You can add a GameEntity to a scene by editing the [Scene](../../_xmldocs/scene.md)'s `scene.xscene` file or spawn (instantiate) one directly using the following static method from the GameEntity class: | ||
| 要向场景里添加一个游戏实体,除了通过编辑场景\([Scene](../../_xmldocs/scene.md)\)文件`scene.xscene`外,也可以直接通过`GameEntity`类的静态方法`Instantiate`“刷出”\(实例化出\)一个,比如: | ||
|
|
||
| ```csharp | ||
| GameEntity.Instantiate(Scene scene, string prefabName, MatrixFrame frame) | ||
| ``` | ||
|
|
||
| Example Usage (spawning at main [Agent](../mountandblade/agent.md)): | ||
| 另一个例子,往`main [Agent]`(../mountandblade/agent.md)里生成一个物体。\(注:`Agent`负责处理活物\) | ||
|
|
||
| ```csharp | ||
| GameEntity.Instantiate(Mission.Current.Scene, "ship_a", Agent.Main.Frame) | ||
| ``` | ||
|
|
||
| ## Multiplayer GameEntities | ||
| ## 多人模式中的游戏实体 | ||
|
|
||
| Some GameEntities will not be synced between Clients, unless a SynchedMissionObject ScriptComponent is added. | ||
| 某些游戏实体无法在玩家的客户端之间同步,因此你需要自己往脚本组件\(`ScriptComponent`\)里添加 `SynchedMissionObject`。 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| # Input | ||
|
|
||
| This static type provides you with input functionality, the base input system has no events to bind to and supports polling only. It's largely self explanatory with a few possible gotchas. | ||
| `Input`这个静态类型用来提供输入功能。基本的输入系统并不是基于事件绑定的,而是采用轮询的方式。这部分内容比较直观,一般来说看函数名就知道用法,但也会有几个坑。 | ||
|
|
||
| ## Key Polling | ||
| ## 按键轮询 | ||
|
|
||
| `GetKeyDown(KeyCode)` | `GetKeyPressed(KeyCode)` | `GetKeyReleased(KeyCode)` - These are likely to be the most commonly used methods, `GetKeyDown` will return true on any number of frames so long as a key is down, this can cause undesired behaviour. If you only want to read an input once, use `GetKeyPressed` or `GetKeyReleased`. | ||
| `GetKeyDown(KeyCode)` | `GetKeyPressed(KeyCode)` | `GetKeyReleased(KeyCode)` - 这几个貌似是最常用的方法了。 关于 `GetKeyDown` 请注意:只要键盘按键处于按下状态,程序就会在每一帧持续不断地返回`true`,显然这会导致运行一些不必要的方法\(造成资源浪费\)。假如你只想触发一次按键操作,可以用`GetKeyPressed` 或者 `GetKeyReleased`。 | ||
|
|
||
| You can also use the extension methods `IsDown`/`IsPressed`/`IsReleased` like so `KeyCode.A.IsPressed()` | ||
| 还有几个扩展方法也可以达到按键的效果:`IsDown`/`IsPressed`/`IsReleased`。用法如: `KeyCode.A.IsPressed()`。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,9 @@ | ||
| # Agent | ||
|
|
||
| You can think of an agent as any **living** entity in the game. | ||
| 你可以把媒介(`agent`)想象成游戏里任何**能走动**的实体。 | ||
|
|
||
| This might be the player, an NPC character, or even a horse. | ||
| 比方说可以是玩家,NPC,甚至是一匹马。 | ||
|
|
||
| ## Tips | ||
|
|
||
| * You can get the player agent through the `Agent.Main` property (assuming they are alive). | ||
| ## 小贴士 | ||
|
|
||
| * 你可以通过`Agent`下的`Agent.Main` 属性调用玩家媒介\(前提是玩家还活着\)。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.