Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс CameraShake

Закрытые члены

void ~CameraShake ()
 
void CameraShake (float strength_factor, float radius, float smoothness, float radius_decay_speed)
 
void Update (float delta_time, out float x_axis, out float y_axis)
 

Закрытые данные

const float MIN_PLAYER_DISTANCE = 40
 
float m_Radius
 
float m_RadiusDecaySpeed
 
float m_RandomAngle
 
float m_Time
 
float m_InitLR
 
float m_InitUD
 
bool m_ToDelete
 
float m_Smoothness
 
float m_StregthFactor
 
DayZPlayerImplement m_Player
 

Подробное описание

Конструктор(ы)

◆ ~CameraShake()

void ~CameraShake ( )
inlineprivate
17 {
18 if(m_Player)
19 m_Player.GetAimingModel().SetCamShakeValues(0, 0);
20
21 }
DayZPlayerImplement m_Player
Definition CameraShake.c:14

Перекрестные ссылки m_Player.

◆ CameraShake()

void CameraShake ( float strength_factor,
float radius,
float smoothness,
float radius_decay_speed )
inlineprivate
24 {
25 /*
26
27 Print("-----------ON CREATE------------");
28 Print(camera_offset);
29 Print("-----------ON CREATE END------------");
30 */
31 //m_Player = DayZPlayerImplement.Cast(player);
34 //m_InitLR = lr_angle;
35 //m_InitUD = ud_angle;
36 m_Radius = radius;
39 }
PlayerBase GetPlayer()
Definition ModifierBase.c:47
float m_Smoothness
Definition CameraShake.c:12
float m_RadiusDecaySpeed
Definition CameraShake.c:6
float m_StregthFactor
Definition CameraShake.c:13
float m_Radius
Definition CameraShake.c:5
Definition ManBase.c:2
Definition EntityAI.c:95
proto native CGame GetGame()

Перекрестные ссылки GetGame(), GetPlayer(), m_Player, m_Radius, m_RadiusDecaySpeed, m_Smoothness и m_StregthFactor.

Методы

◆ Update()

void Update ( float delta_time,
out float x_axis,
out float y_axis )
inlineprivate
42 {
43 if(m_ToDelete)
44 delete this;
45
46 m_Radius -= delta_time * m_RadiusDecaySpeed; //diminish radius each frame
47
48 if( m_RandomAngle >= 0 )
49 {
51 }
52 else
53 {
55 }
56
59
60 //Print(x_axis);
61 //Print(y_axis);
62
63 if( m_Radius < 0.01 )
64 {
65 m_ToDelete = true;
66 }
67 }
bool m_ToDelete
Definition CameraShake.c:11
float m_RandomAngle
Definition CameraShake.c:7
Definition EnMath.c:7
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].

Перекрестные ссылки m_Radius, m_RadiusDecaySpeed, m_RandomAngle, m_Smoothness, m_StregthFactor, m_ToDelete и Math::RandomFloat().

Поля

◆ m_InitLR

float m_InitLR
private

◆ m_InitUD

float m_InitUD
private

◆ m_Player

DayZPlayerImplement m_Player
private

Используется в CameraShake() и ~CameraShake().

◆ m_Radius

float m_Radius
private

Используется в CameraShake() и Update().

◆ m_RadiusDecaySpeed

float m_RadiusDecaySpeed
private

Используется в CameraShake() и Update().

◆ m_RandomAngle

float m_RandomAngle
private

Используется в Update().

◆ m_Smoothness

float m_Smoothness
private

Используется в CameraShake() и Update().

◆ m_StregthFactor

float m_StregthFactor
private

Используется в CameraShake() и Update().

◆ m_Time

float m_Time
private

◆ m_ToDelete

bool m_ToDelete
private

Используется в Update().

◆ MIN_PLAYER_DISTANCE

const float MIN_PLAYER_DISTANCE = 40
private

Объявления и описания членов класса находятся в файле: