|
Survivalcraft API 1.8.2.3 v1.8.2.3
Survivalcraft 2.4
|


类 | |
| class | Factor |
| 这里的Factor类型从struct改为class,是由于模组在修改Factor的时候,通常是需要修改引用的值。 如果是struct则只能复制并修改值,不能修改引用。 更多... | |
Public 成员函数 | |
| virtual void | AddExperience (int count, bool playSound) |
| override void | GenerateStrengthFactors () |
| 生成玩家的所有关于力量的因素 | |
| override void | GenerateResilienceFactors () |
| 生成玩家所有关于防御的因素 | |
| override void | GenerateSpeedFactors () |
| 生成玩家所有关于速度的因素 | |
| override void | GenerateHungerFactors () |
| 生成玩家所有关于饥饿的因素 | |
| void | GenerateWetnessFactors () |
| 生成玩家所有关于潮湿度的因素 | |
| override void | Update (float dt) |
| 对等级系统的更新进行了调整。 第一步是计算上一帧Factors的最终结果,并进行赋值。此时已经经过了所有模组的修改。 第二步是GenerateFactors对四个属性进行生成,此时四个m_xxxFactors会拥有初始值。 再往后面则是各模组对Factors的增删改。 | |
| override void | Load (ValuesDictionary valuesDictionary, IdToEntityMap idToEntityMap) |
| AttackSpeed: 生物攻速 DigSpeed: 挖掘速度 ChaseRange: 非玩家生物的仇恨距离 | |
| void | GenerateClothingSpeedFactors (int clothingValue) |
| Public 成员函数 继承自 Game.ComponentFactors | |
| virtual float | GetOtherFactorResult (string factorName, bool recalculate=false, bool throwIfNotFound=false) |
| virtual void | CalculateOtherFactorsResult () |
| virtual void | GenerateOtherFactors () |
| virtual float | CalculateStrengthFactor (ICollection< Factor > factors) |
| virtual float | CalculateResilienceFactor (ICollection< Factor > factors) |
| virtual float | CalculateSpeedFactor (ICollection< Factor > factors) |
| virtual float | CalculateHungerFactor (ICollection< Factor > factors) |
| Public 成员函数 继承自 GameEntitySystem.Component | |
| virtual IEnumerable< Entity > | GetOwnedEntities () |
| virtual void | OnEntityAdded () |
| virtual void | OnEntityRemoved () |
| virtual void | Save (ValuesDictionary valuesDictionary, EntityToIdMap entityToIdMap) |
| virtual void | Dispose () |
| virtual void | InheritFromComponent (Component baseComponent) |
| virtual void | Initialize (Entity entity, ValuesDictionary valuesDictionary) |
静态 Public 成员函数 | |
| static void | AddClothingFactor (int clothingValue, ref float clothingFactor, ICollection< Factor > factors) |
| 静态 Public 成员函数 继承自 Game.ComponentFactors | |
| static float | CalculateFactorsResult (ICollection< Factor > factors) |
Public 属性 | |
| float? | m_lastLevelTextValue |
| ComponentPlayer | m_componentPlayer |
| ComponentVitalStats | m_componentVitalStats |
| string | m_cachedPlayerClassName |
| string | m_cachedGameModeString |
| Public 属性 继承自 Game.ComponentFactors | |
| Random | m_random = new() |
| SubsystemGameInfo | m_subsystemGameInfo |
| SubsystemAudio | m_subsystemAudio |
| SubsystemTime | m_subsystemTime |
| Dictionary< string, List< Factor > > | OtherFactors = new() |
| 模组如果有自定义的Factors,可以使用这个OtherFactors。例如使用OtherFactors["AttackRate"]来定义攻击频率。 | |
| Dictionary< string, float > | OtherFactorsResults = new() |
| List< Factor > | m_strengthFactors = [] |
| 这四个Factors是可以调整的影响因素 | |
| List< Factor > | m_speedFactors = [] |
| List< Factor > | m_hungerFactors = [] |
| List< Factor > | m_resilienceFactors = [] |
| Public 属性 继承自 GameEntitySystem.Component | |
| Entity | m_entity |
| ValuesDictionary | m_valuesDictionary |
静态 Public 属性 | |
| static new string | fName = "ComponentLevel" |
| const float | FemaleStrengthFactor = 0.8f |
| const float | FemaleResilienceFactor = 0.8f |
| const float | FemaleSpeedFactor = 1.03f |
| const float | FemaleHungerFactor = 0.7f |
| 静态 Public 属性 继承自 Game.ComponentFactors | |
| static string | fName = "ComponentFactors" |
额外继承的成员函数 | |
| 包函数 继承自 GameEntitySystem.Component | |
| void | DisposeInternal () |
| 属性 继承自 Game.ComponentFactors | |
| UpdateOrder | UpdateOrder [get] |
| float | StrengthFactor = 1f [get, set] |
| float | ResilienceFactor = 1f [get, set] |
| float | SpeedFactor = 1f [get, set] |
| float | HungerFactor = 1f [get, set] |
| 属性 继承自 GameEntitySystem.Component | |
| ValuesDictionary | ValuesDictionary [get] |
| Entity | Entity [get] |
| Project | Project [get] |
| bool | IsAddedToProject [get] |
| 属性 继承自 Game.IUpdateable | |
| float | FloatUpdateOrder [get] |
在文件 ComponentLevel.cs 第 12 行定义.
|
static |
|
virtual |
| void Game.ComponentLevel.GenerateClothingSpeedFactors | ( | int | clothingValue | ) |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
| void Game.ComponentLevel.GenerateWetnessFactors | ( | ) |
|
virtual |
AttackSpeed: 生物攻速 DigSpeed: 挖掘速度 ChaseRange: 非玩家生物的仇恨距离
| valuesDictionary | |
| idToEntityMap |
在文件 ComponentLevel.cs 第 383 行定义.

|
virtual |
对等级系统的更新进行了调整。 第一步是计算上一帧Factors的最终结果,并进行赋值。此时已经经过了所有模组的修改。 第二步是GenerateFactors对四个属性进行生成,此时四个m_xxxFactors会拥有初始值。 再往后面则是各模组对Factors的增删改。
| dt |
在文件 ComponentLevel.cs 第 354 行定义.

|
static |
在文件 ComponentLevel.cs 第 48 行定义.
|
static |
在文件 ComponentLevel.cs 第 46 行定义.
|
static |
在文件 ComponentLevel.cs 第 47 行定义.
|
static |
在文件 ComponentLevel.cs 第 45 行定义.
|
static |
在文件 ComponentLevel.cs 第 36 行定义.
| string Game.ComponentLevel.m_cachedGameModeString |
在文件 ComponentLevel.cs 第 43 行定义.
| string Game.ComponentLevel.m_cachedPlayerClassName |
在文件 ComponentLevel.cs 第 42 行定义.
| ComponentPlayer Game.ComponentLevel.m_componentPlayer |
在文件 ComponentLevel.cs 第 40 行定义.
| ComponentVitalStats Game.ComponentLevel.m_componentVitalStats |
在文件 ComponentLevel.cs 第 41 行定义.
| float? Game.ComponentLevel.m_lastLevelTextValue |
在文件 ComponentLevel.cs 第 38 行定义.