Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс SpookyEventBase
+ Граф наследования:SpookyEventBase:

Защищенные члены

void SpookyEventBase ()
 
void Init ()
 
vector GetMatchingSurfacePos (TStringArray surfaces, TStringVectorMap gatheredSurfaces)
 
void SetCoolDown (float secs)
 
bool HasSurfaces ()
 
bool CanDo (PlayerBase player, TStringVectorMap surfaceTypes)
 
void Do (PlayerBase player)
 
bool CanPerform (PlayerBase player, float currentTime, TStringVectorMap surfaceTypes)
 
void Perform (PlayerBase player, float currentTime, TStringVectorMap gatheredSurfaces)
 
vector GetSoundPos (PlayerBase player)
 

Защищенные данные

float m_PerformedTimestamp
 
int m_Cooldown
 
string m_SoundSet
 
ref TStringArray m_Surfaces
 
vector m_MatchingSurfacePos
 

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

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

◆ SpookyEventBase()

void SpookyEventBase ( )
inlineprotected
97 {
98 Init();
99 }

Перекрестные ссылки Init().

Методы

◆ CanDo()

bool CanDo ( PlayerBase player,
TStringVectorMap surfaceTypes )
inlineprotected
130 {
131 return true;
132 }

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

◆ CanPerform()

bool CanPerform ( PlayerBase player,
float currentTime,
TStringVectorMap surfaceTypes )
inlineprotected
138 {
139 bool surfaceCheckResult = 1;
140
141 if (HasSurfaces())
142 {
145 }
146
147
149 }
Definition EntityAI.c:95
bool HasSurfaces()
Definition SpookyAreaMisc.c:124
vector GetMatchingSurfacePos(TStringArray surfaces, TStringVectorMap gatheredSurfaces)
Definition SpookyAreaMisc.c:104
vector m_MatchingSurfacePos
Definition SpookyAreaMisc.c:94
ref TStringArray m_Surfaces
Definition SpookyAreaMisc.c:93
bool CanDo(PlayerBase player, TStringVectorMap surfaceTypes)
Definition SpookyAreaMisc.c:129
int m_Cooldown
Definition SpookyAreaMisc.c:90
float m_PerformedTimestamp
Definition SpookyAreaMisc.c:89
Definition EnConvert.c:106
static const vector Zero
Definition EnConvert.c:110

Перекрестные ссылки CanDo(), GetMatchingSurfacePos(), HasSurfaces(), m_Cooldown, m_MatchingSurfacePos, m_PerformedTimestamp, m_Surfaces и vector::Zero.

◆ Do()

void Do ( PlayerBase player)
protected

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

◆ GetMatchingSurfacePos()

vector GetMatchingSurfacePos ( TStringArray surfaces,
TStringVectorMap gatheredSurfaces )
inlineprotected
105 {
106 for (int i = 0; i < gatheredSurfaces.Count(); i++)
107 {
108 string currSurface = gatheredSurfaces.GetKey(i);
109 foreach (string s:surfaces)
110 {
111 if (currSurface.Contains(s))
112 return gatheredSurfaces.Get(currSurface);
113 }
114 }
115
116 return vector.Zero;
117 }

Перекрестные ссылки vector::Zero.

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

◆ GetSoundPos()

vector GetSoundPos ( PlayerBase player)
inlineprotected
176 {
178
179 if (HasSurfaces())
180 {
182 }
183 else
184 {
185 float distance = Math.RandomFloatInclusive(5,15);
187 vector playerPos = player.GetPosition();
189 }
190
191 return soundPos;
192 }
Definition EnMath.c:7
static vector RandomDir2D()
Returns randomly generated XZ unit vector with the Y(up) axis set to 0.
Definition EnConvert.c:260
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106

Перекрестные ссылки HasSurfaces(), m_MatchingSurfacePos, vector::RandomDir2D() и Math::RandomFloatInclusive().

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

◆ HasSurfaces()

bool HasSurfaces ( )
inlineprotected
125 {
126 return (m_Surfaces && m_Surfaces.Count() > 0);
127 }

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

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

◆ Init()

void Init ( )
protected

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

◆ Perform()

void Perform ( PlayerBase player,
float currentTime,
TStringVectorMap gatheredSurfaces )
inlineprotected
153 {
154 #ifdef DIAG_DEVELOPER
155 if (DiagMenu.GetBool(DiagMenuIDs.TRIGGER_DEBUG))
156 Print("Performing " + this);
157 #endif
159
160 if (m_SoundSet)
161 {
164 sound.SetAutodestroy( true );
165
166 #ifdef DIAG_DEVELOPER
167 if (DiagMenu.GetBool(DiagMenuIDs.TRIGGER_DEBUG))
168 Debug.DrawSphere(soundPos , 0.15,Colors.YELLOW, ShapeFlags.NOZBUFFER);
169 #endif
170 }
171
172 Do(player);
173 }
DiagMenuIDs
Definition EDiagMenuIDs.c:2
Definition Colors.c:4
const int YELLOW
Definition Colors.c:10
Definition Debug.c:14
static Shape DrawSphere(vector pos, float size=1, int color=0x1fff7f7f, ShapeFlags flags=ShapeFlags.TRANSP|ShapeFlags.NOOUTLINE)
Definition Debug.c:485
Definition EnDebug.c:233
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5
Manager class for managing Effect (EffectParticle, EffectSound)
Definition EffectManager.c:6
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
Definition EffectManager.c:165
vector GetSoundPos(PlayerBase player)
Definition SpookyAreaMisc.c:175
void Do(PlayerBase player)
string m_SoundSet
Definition SpookyAreaMisc.c:92
proto void Print(void var)
Prints content of variable to console/log.
ShapeFlags
Definition EnDebug.c:126
static proto bool GetBool(int id, bool reverse=false)
Get value as bool from the given script id.

Перекрестные ссылки Do(), Debug::DrawSphere(), DiagMenu::GetBool(), GetSoundPos(), m_PerformedTimestamp, m_SoundSet, SEffectManager::PlaySound(), Print() и Colors::YELLOW.

◆ SetCoolDown()

void SetCoolDown ( float secs)
inlineprotected
120 {
121 m_Cooldown = secs * 1000;
122 }

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

Используется в SpookyEventWind::Init() и SpookyEventSteps::Init().

Поля

◆ m_Cooldown

int m_Cooldown
protected

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

◆ m_MatchingSurfacePos

vector m_MatchingSurfacePos
protected

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

◆ m_PerformedTimestamp

float m_PerformedTimestamp
protected

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

◆ m_SoundSet

string m_SoundSet
protected

◆ m_Surfaces

ref TStringArray m_Surfaces
protected

Используется в CanPerform(), HasSurfaces() и SpookyEventSteps::Init().


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