89 public override void Update(
float dt) {
110 float num = m_componentCreature.ComponentLocomotion.SlipSpeed
111 ?? (m_componentCreature.ComponentBody.Velocity.XZ -
m_componentCreature.ComponentBody.StandingOnVelocity.XZ).Length();
132 if (componentMount !=
null) {
134 if (componentCreatureModel !=
null) {
135 Bob = componentCreatureModel.
Bob;
152 Bob += num5 * (num3 -
Bob);
158 if (punchPhase < 0.5f
178 && componentMount !=
null
193 && footstepsPhase <= num6) {
226 float x = Math.Clamp(
234 float y = Math.Clamp(
247 if (componentMount !=
null) {
250 vector.X += (float)Math.PI;
270 float num8 = m_componentCreature.ComponentLocomotion.LastWalkOrder.HasValue
286 float num10 = MathF.Sin(MathF.Sqrt(
m_componentMiner.PokingPhase) * (
float)Math.PI);
287 num9 = m_componentMiner.ActiveBlockValue == 0 ? 1f * num10 : 0.3f + 1f * num10;
299 float num18 = 0.6f * (float)Math.Sin(6.91150426864624 *
m_subsystemTime.GameTime);
300 float num19 = 0.2f + 0.2f * (float)Math.Cos(6.91150426864624 * (
m_subsystemTime.GameTime + 0.5));
320 float num24 = !m_componentCreature.ComponentLocomotion.IsCreativeFlyEnabled ? 1 : 4;
361 float num26 = 1f - num25;
365 * m_componentCreature.ComponentBody.BoxSize.Y
367 + num25 * Vector3.UnitY * m_componentCreature.ComponentBody.BoxSize.Z * 0.1f;
387 base.DrawExtras(camera);
411 m_drawBlockEnvironmentData.DrawBlockMode =
DrawBlockMode.ThirdPerson;
412 m_drawBlockEnvironmentData.InWorldMatrix = matrix;
413 m_drawBlockEnvironmentData.Humidity =
m_subsystemTerrain.Terrain.GetSeasonalHumidity(x, z);
414 m_drawBlockEnvironmentData.Temperature =
m_subsystemTerrain.Terrain.GetSeasonalTemperature(x, z)
417 m_drawBlockEnvironmentData.BillboardDirection = -
Vector3.
UnitZ;
419 m_drawBlockEnvironmentData.Owner =
m_entity;
433 base.Load(valuesDictionary, idToEntityMap);
448 base.SetModel(model);
476 Vector3 result = m_componentCreature.ComponentBody.Position + matrix.Up * (num3 + 2f *
Bob) + matrix.
Forward * -0.2f * num;
478 "RecalculateModelEyePosition",
480 loader.RecalculateModelEyePosition(
this, ref result);
492 Quaternion result = m_componentCreature.ComponentBody.Rotation
499 "RecalculateModelEyeRotation",
501 loader.RecalculateModelEyeRotation(
this, ref result);
static float Remainder(float x, float y)
static int Min(int x1, int x2)
static float Sigmoid(float x, float steepness)
static float NormalizeAngle(float angle)
static float Saturate(float x)
static int Max(int x1, int x2)
static float DegToRad(float degrees)
static float Lerp(float x1, float x2, float f)
virtual Vector3 GetInHandOffset(int value)
void DrawBlock(PrimitivesRenderer3D primitivesRenderer, int value, Color color, float size, ref Matrix matrix, DrawBlockEnvironmentData environmentData)
绘制方块_用于绘制方块物品形态
virtual Vector3 GetInHandRotation(int value)
virtual float GetInHandScale(int value)
Matrix InvertedViewMatrix
virtual float ImmersionFactor
Vector3 InHandItemRotationOrder
Vector3 InHandItemOffsetOrder
SubsystemGameInfo m_subsystemGameInfo
SubsystemTime m_subsystemTime
ComponentCreature m_componentCreature
float MovementAnimationPhase
DrawBlockEnvironmentData m_drawBlockEnvironmentData
override float AttackFactor
ComponentMiner m_componentMiner
override Vector3 CalculateEyePosition()
SubsystemTerrain m_subsystemTerrain
Vector3 m_inHandItemRotation
override float AttackPhase
override Quaternion CalculateEyeRotation()
Vector3 m_inHandItemOffset
override void SetModel(Model model)
SubsystemAudio m_subsystemAudio
SubsystemNoise m_subsystemNoise
ComponentRider m_componentRider
float m_walkAnimationSpeed
float m_lieDownFactorModel
override void Load(ValuesDictionary valuesDictionary, IdToEntityMap idToEntityMap)
ComponentSleep m_componentSleep
override void Update(float dt)
SubsystemModelsRenderer m_subsystemModelsRenderer
override void DrawExtras(Camera camera)
ComponentPlayer m_componentPlayer
override void AnimateCreature()
virtual void SetBoneTransform(int boneIndex, Matrix? transformation)
virtual Func< bool > OnAnimate
Matrix[] AbsoluteBoneTransformsForCamera
ComponentBody ComponentBody
static float Noise(float x)
static Func< int, int > GetTemperatureAdjustmentAtHeight
static int ExtractContents(int value)
static int ToCell(float x)
ValuesDictionary ValuesDictionary
ValuesDictionary ValuesDictionary
Component FindComponent(Type type, string name, bool throwOnError)
static void HookAction(string HookName, Func< ModLoader, bool > action)
执行Hook
DatabaseObject DatabaseObject
static Matrix CreateRotationX(float radians)
static Matrix CreateTranslation(float x, float y, float z)
static Matrix CreateRotationZ(float radians)
static readonly Matrix Identity
static Matrix CreateFromYawPitchRoll(float yaw, float pitch, float roll)
static Matrix CreateRotationY(float radians)
static Matrix CreateScale(float scale)
static Quaternion CreateFromYawPitchRoll(float yaw, float pitch, float roll)
static readonly Vector2 Zero
static readonly Vector2 UnitY
static float Angle(Vector2 v1, Vector2 v2)
static Vector3 Lerp(Vector3 v1, Vector3 v2, float f)
static Vector3 Normalize(Vector3 v)
static readonly Vector3 Zero
static readonly Vector3 UnitZ