Survivalcraft API 1.8.2.3 v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
Game.ComponentLevel
类 Game.ComponentLevel 继承关系图:
Game.ComponentLevel 的协作图:

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< EntityGetOwnedEntities ()
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.cs12 行定义.

成员函数说明

◆ AddClothingFactor()

void Game.ComponentLevel.AddClothingFactor ( int clothingValue,
ref float clothingFactor,
ICollection< Factor > factors )
static

在文件 ComponentLevel.cs409 行定义.

函数调用图:

◆ AddExperience()

virtual void Game.ComponentLevel.AddExperience ( int count,
bool playSound )
virtual

在文件 ComponentLevel.cs50 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ GenerateClothingSpeedFactors()

void Game.ComponentLevel.GenerateClothingSpeedFactors ( int clothingValue)

在文件 ComponentLevel.cs395 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ GenerateHungerFactors()

override void Game.ComponentLevel.GenerateHungerFactors ( )
virtual

生成玩家所有关于饥饿的因素

重载 Game.ComponentFactors .

在文件 ComponentLevel.cs272 行定义.

函数调用图:

◆ GenerateResilienceFactors()

override void Game.ComponentLevel.GenerateResilienceFactors ( )
virtual

生成玩家所有关于防御的因素

重载 Game.ComponentFactors .

在文件 ComponentLevel.cs157 行定义.

函数调用图:

◆ GenerateSpeedFactors()

override void Game.ComponentLevel.GenerateSpeedFactors ( )
virtual

生成玩家所有关于速度的因素

重载 Game.ComponentFactors .

在文件 ComponentLevel.cs211 行定义.

函数调用图:

◆ GenerateStrengthFactors()

override void Game.ComponentLevel.GenerateStrengthFactors ( )
virtual

生成玩家的所有关于力量的因素

重载 Game.ComponentFactors .

在文件 ComponentLevel.cs93 行定义.

函数调用图:

◆ GenerateWetnessFactors()

void Game.ComponentLevel.GenerateWetnessFactors ( )

生成玩家所有关于潮湿度的因素

在文件 ComponentLevel.cs312 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ Load()

override void Game.ComponentLevel.Load ( ValuesDictionary valuesDictionary,
IdToEntityMap idToEntityMap )
virtual

AttackSpeed: 生物攻速 DigSpeed: 挖掘速度 ChaseRange: 非玩家生物的仇恨距离

参数
valuesDictionary
idToEntityMap

重载 Game.ComponentFactors .

在文件 ComponentLevel.cs383 行定义.

函数调用图:

◆ Update()

override void Game.ComponentLevel.Update ( float dt)
virtual

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

参数
dt

重载 Game.ComponentFactors .

在文件 ComponentLevel.cs354 行定义.

函数调用图:

类成员变量说明

◆ FemaleHungerFactor

const float Game.ComponentLevel.FemaleHungerFactor = 0.7f
static

在文件 ComponentLevel.cs48 行定义.

◆ FemaleResilienceFactor

const float Game.ComponentLevel.FemaleResilienceFactor = 0.8f
static

在文件 ComponentLevel.cs46 行定义.

◆ FemaleSpeedFactor

const float Game.ComponentLevel.FemaleSpeedFactor = 1.03f
static

在文件 ComponentLevel.cs47 行定义.

◆ FemaleStrengthFactor

const float Game.ComponentLevel.FemaleStrengthFactor = 0.8f
static

在文件 ComponentLevel.cs45 行定义.

◆ fName

new string Game.ComponentLevel.fName = "ComponentLevel"
static

在文件 ComponentLevel.cs36 行定义.

◆ m_cachedGameModeString

string Game.ComponentLevel.m_cachedGameModeString

在文件 ComponentLevel.cs43 行定义.

◆ m_cachedPlayerClassName

string Game.ComponentLevel.m_cachedPlayerClassName

在文件 ComponentLevel.cs42 行定义.

◆ m_componentPlayer

ComponentPlayer Game.ComponentLevel.m_componentPlayer

在文件 ComponentLevel.cs40 行定义.

◆ m_componentVitalStats

ComponentVitalStats Game.ComponentLevel.m_componentVitalStats

在文件 ComponentLevel.cs41 行定义.

◆ m_lastLevelTextValue

float? Game.ComponentLevel.m_lastLevelTextValue

在文件 ComponentLevel.cs38 行定义.


该类的文档由以下文件生成:
  • E:/sc/doxygen/SurvivalcraftApi 1.8.2.3/Survivalcraft.Windows/Component/ComponentLevel.cs