DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
DayZIntroScenePC.c
См. документацию.
2{
3 protected bool m_EnableClick;
4 protected bool m_RotatingCharacter;
7 protected float m_RotatingCharacterRot;
8 protected float m_Radius;
9 protected float m_Radius_original;
10 protected float m_DiffX;
11 protected float m_DeltaX;
12 protected float m_DeltaZ;
13 protected float m_Angle;
14 protected float m_Angle_offset = 0;
15 protected float m_NewX = 0;
16 protected float m_NewZ = 0;
17 protected float m_BlurValue;
18
19 protected ref OptionsMenu m_optmenu;
20
21 // ------------------------------------------------------------
23 {
24 SetClickEnable( true );
25
26 m_DeltaX = Math.AbsFloat(m_CharacterPos[0] - m_Camera.GetPosition()[0]);
27 m_DeltaZ = Math.AbsFloat(m_CharacterPos[2] - m_Camera.GetPosition()[2]);
28
29 if (!m_Radius || m_Radius == 0)
30 {
33 }
34 }
35
36 protected override void SetInitPostprocesses()
37 {
38 super.SetInitPostprocesses();
39
40 PPERequester_MenuEffects requester;
41 Class.CastTo(requester,PPERequesterBank.GetRequester(PPERequester_MenuEffects));
42
43 requester.SetVignetteIntensity(0.5);
44 }
45
46 // ------------------------------------------------------------
47 void SetClickEnable( bool enable )
48 {
49 m_EnableClick = enable;
50 }
51
52 // ------------------------------------------------------------
54 {
55 return m_EnableClick;
56 }
57
58 // ------------------------------------------------------------
69
70 // ------------------------------------------------------------
72 {
74 {
75 m_RotatingCharacter = false;
76 }
77 }
78
79 // ------------------------------------------------------------
81 {
83 }
84
85 // ------------------------------------------------------------
87 {
88 if (m_Character && m_Character.GetCharacterObj())
89 {
90 int actual_mouse_x;
91 int actual_mouse_y;
92 float coef;
93 GetMousePos(actual_mouse_x, actual_mouse_y);
94
95 m_DiffX = m_RotatingCharacterMouseX - actual_mouse_x;
96
97 coef = ( m_RotatingCharacterRot + (m_DiffX * 0.5) ) / 360;
98 coef = coef - Math.Floor(coef);
99 m_CharacterRot[0] = coef * 360;
100
101 m_Character.GetCharacterObj().SetOrientation(m_CharacterRot);
102 }
103 }
104
105 // ------------------------------------------------------------
106 void Update()
107 {
109 {
111 }
112 }
113};
Super root of all classes in Enforce script.
Определения EnScript.c:11
vector m_CharacterPos
Определения DayZIntroScene.c:6
Camera m_Camera
Определения DayZIntroScene.c:4
ref IntroSceneCharacter m_Character
Определения DayZIntroScene.c:3
void DayZIntroScene()
Определения DayZIntroScene.c:13
vector m_CharacterRot
Определения DayZIntroScene.c:7
float m_DiffX
Определения DayZIntroScenePC.c:10
float m_Angle_offset
Определения DayZIntroScenePC.c:14
float m_NewZ
Определения DayZIntroScenePC.c:16
float m_DeltaZ
Определения DayZIntroScenePC.c:12
float m_Radius
Определения DayZIntroScenePC.c:8
bool m_EnableClick
Определения DayZIntroScenePC.c:3
int m_RotatingCharacterMouseX
Определения DayZIntroScenePC.c:5
ref OptionsMenu m_optmenu
Определения DayZIntroScenePC.c:19
void DayZIntroScenePC()
Определения DayZIntroScenePC.c:22
float m_Angle
Определения DayZIntroScenePC.c:13
void Update()
Определения DayZIntroScenePC.c:106
void CharacterRotate()
Определения DayZIntroScenePC.c:86
void SetClickEnable(bool enable)
Определения DayZIntroScenePC.c:47
int m_RotatingCharacterMouseY
Определения DayZIntroScenePC.c:6
override void SetInitPostprocesses()
Определения DayZIntroScenePC.c:36
float m_NewX
Определения DayZIntroScenePC.c:15
bool m_RotatingCharacter
Определения DayZIntroScenePC.c:4
float m_Radius_original
Определения DayZIntroScenePC.c:9
bool IsRotatingCharacter()
Определения DayZIntroScenePC.c:80
void CharacterRotationStart()
Определения DayZIntroScenePC.c:59
float m_BlurValue
Определения DayZIntroScenePC.c:17
float m_DeltaX
Определения DayZIntroScenePC.c:11
void CharacterRotationStop()
Определения DayZIntroScenePC.c:71
bool IsClickEnabled()
Определения DayZIntroScenePC.c:53
float m_RotatingCharacterRot
Определения DayZIntroScenePC.c:7
Определения EnMath.c:7
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float Floor(float f)
Returns floor of value.
static proto float Sqrt(float val)
Returns square root.
static proto float Pow(float v, float power)
Return power of v ^ power.
static proto float AbsFloat(float f)
Returns absolute value.
proto void GetMousePos(out int x, out int y)