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

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

int GetSoundDelay ()
 
int GetLightDelay ()
 
float GetExplosionDistance ()
 
float GetShotDispersionAngle ()
 
string GetExplosionSoundSet ()
 
float GetExplosionDelay ()
 
void FireworksLauncherClientEvent (FireworksLauncher item, int index)
 
void ~FireworksLauncherClientEvent ()
 
void OnFired ()
 
vector GetShotPos ()
 
void CalculateExplosionPosition ()
 
vector GetExplosionPosition ()
 
int GetSecondaryExplosionCount ()
 
void OnExplode ()
 
void RequestSecondaryExplosion ()
 
void SpawnSecondaryExplosion ()
 
int GetSecondaryExplosionDelay ()
 
int GetExplParticleFromSequence ()
 
void SetupLight (PointLightBase light)
 
void SpawnLight ()
 
void PlayExplosionSound ()
 

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

ref Timer m_Timer = new Timer()
 
FireworksLauncher m_Item
 
int m_Index
 
vector m_ExplosionPos
 
EffectSound m_FireSound
 
EffectSound m_ExplosionSound
 
ParticleSource m_ParticleShot
 
ParticleSource m_ParticleExplosion
 
vector m_ShotDir
 
ExplosionLight m_ExplosionLight
 
ParticleSource m_ParticleAfterBurnEnd
 
string m_Color
 
int m_RemainingExplosions = GetSecondaryExplosionCount()
 
ref array< ref FireworksLauncherClientEventBase > m_Events = new ref array<ref FireworksLauncherClientEventBase>
 

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

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

◆ FireworksLauncherClientEvent()

void FireworksLauncherClientEvent ( FireworksLauncher item,
int index )
inlineprotected
89 {
90 m_Item = item;
91 m_Index = index;
92
94 int coloreSequenceIndex = m_Index - 1;//shot index(m_Index) starts at 1
95
97 {
99 }
100 else
101 {
102 Debug.LogError("Failed to obtain color from color sequence");
103 m_Color = "B";
104 }
105 }
Definition Debug.c:14
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Definition Debug.c:259
int m_Index
Definition FireworksLauncher.c:32
FireworksLauncher m_Item
Definition FireworksLauncher.c:31
string m_Color
Definition FireworksLauncher.c:41
string GetColorSequence()
Definition FireworksLauncher.c:383
Definition EntityAI.c:95
proto string Get(int index)
Gets n-th character from string.
proto native int Length()
Returns length of string.

Перекрестные ссылки string::Get(), FireworksLauncher::GetColorSequence(), string::Length(), Debug::LogError(), m_Color, m_Index и m_Item.

◆ ~FireworksLauncherClientEvent()

void ~FireworksLauncherClientEvent ( )
inlineprotected
108 {
112 {
114 }
115 }
EffectSound m_FireSound
Definition FireworksLauncher.c:34
ParticleSource m_ParticleAfterBurnEnd
Definition FireworksLauncher.c:40
EffectSound m_ExplosionSound
Definition FireworksLauncher.c:35
override bool StopParticle(int flags=0)
Method to tell the particle to stop playing.
Definition ParticleSource.c:372
Manager class for managing Effect (EffectParticle, EffectSound)
Definition EffectManager.c:6
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Definition EffectManager.c:271

Перекрестные ссылки SEffectManager::DestroyEffect(), m_ExplosionSound, m_FireSound, m_ParticleAfterBurnEnd и ParticleSource::StopParticle().

Методы

◆ CalculateExplosionPosition()

void CalculateExplosionPosition ( )
inlineprotected
156 {
158 }
vector m_ShotDir
Definition FireworksLauncher.c:38
float GetExplosionDistance()
Definition FireworksLauncher.c:63
vector GetShotPos()
Definition FireworksLauncher.c:137
vector m_ExplosionPos
Definition FireworksLauncher.c:33

Перекрестные ссылки GetExplosionDistance(), GetShotPos(), m_ExplosionPos и m_ShotDir.

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

◆ GetExplosionDelay()

float GetExplosionDelay ( )
inlineprotected
79 {
80 return Math.RandomFloatInclusive(1.5,1.75);
81 }
Definition EnMath.c:7
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106

Перекрестные ссылки Math::RandomFloatInclusive().

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

◆ GetExplosionDistance()

float GetExplosionDistance ( )
inlineprotected
64 {
65 return Math.RandomFloatInclusive(35,40);
66 }

Перекрестные ссылки Math::RandomFloatInclusive().

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

◆ GetExplosionPosition()

vector GetExplosionPosition ( )
inlineprotected
161 {
162 if (!m_ExplosionPos)
163 {
165 }
166 return m_ExplosionPos;
167 }
void CalculateExplosionPosition()
Definition FireworksLauncher.c:155

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

Используется в OnExplode(), SpawnLight(), SpawnSecondaryExplosion() и AnniversaryFireworksLauncherClientEvent::SpawnSecondaryExplosion().

◆ GetExplosionSoundSet()

string GetExplosionSoundSet ( )
inlineprotected
74 {
75 return "FireworksLauncher_Explosion_SoundSet";
76 }

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

◆ GetExplParticleFromSequence()

int GetExplParticleFromSequence ( )
inlineprotected
218 {
219 switch (m_Color)
220 {
221 case "R":
223 case "G":
225 case "B":
227 case "Y":
229 case "P":
231 default:
232 ErrorEx("Incorrect explosion particle color in the sequence");
233 }
235 }
Definition ParticleList.c:12
static const int FIREWORKS_EXPLOSION_RED
Definition ParticleList.c:297
static const int FIREWORKS_EXPLOSION_YELLOW
Definition ParticleList.c:300
static const int FIREWORKS_EXPLOSION_GREEN
Definition ParticleList.c:298
static const int FIREWORKS_EXPLOSION_BLUE
Definition ParticleList.c:299
static const int FIREWORKS_EXPLOSION_PINK
Definition ParticleList.c:301
enum ShapeType ErrorEx

Перекрестные ссылки ErrorEx, ParticleList::FIREWORKS_EXPLOSION_BLUE, ParticleList::FIREWORKS_EXPLOSION_GREEN, ParticleList::FIREWORKS_EXPLOSION_PINK, ParticleList::FIREWORKS_EXPLOSION_RED, ParticleList::FIREWORKS_EXPLOSION_YELLOW и m_Color.

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

◆ GetLightDelay()

int GetLightDelay ( )
inlineprotected
59 {
60 return 0;
61 }

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

◆ GetSecondaryExplosionCount()

int GetSecondaryExplosionCount ( )
inlineprotected
170 {
171 return 4;
172 }

◆ GetSecondaryExplosionDelay()

int GetSecondaryExplosionDelay ( )
inlineprotected
213 {
214 return Math.RandomIntInclusive(100,250);
215 }
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
Definition EnMath.c:54

Перекрестные ссылки Math::RandomIntInclusive().

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

◆ GetShotDispersionAngle()

float GetShotDispersionAngle ( )
inlineprotected
69 {
70 return Math.RandomFloatInclusive(-25,25);//this is rotated 360 degrees around the UP vector too
71 }

Перекрестные ссылки Math::RandomFloatInclusive().

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

◆ GetShotPos()

vector GetShotPos ( )
inlineprotected
138 {
139 vector memPos;
140 string memName = "Shot_" + m_Index;
141
142 if (m_Item.MemoryPointExists(memName))
143 {
144 memPos = m_Item.GetMemoryPointPos(memName);
145 memPos = m_Item.ModelToWorld(memPos);
146 }
147 else
148 {
149 memPos = m_Item.GetPosition();//fallback to item's location
150 Debug.LogError("Missing shot memory point on Fireworks");
151 }
152 return memPos;
153 }
Definition EnConvert.c:106

Перекрестные ссылки Debug::LogError(), m_Index и m_Item.

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

◆ GetSoundDelay()

int GetSoundDelay ( )
inlineprotected
54 {
55 return 0;
56 }

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

◆ OnExplode()

void OnExplode ( )
inlineprotected
176 {
177 #ifdef DEVELOPER
179 {
180 m_ShotTrajectory.Destroy();
182 }
183 #endif
185
186 GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( PlayExplosionSound, GetSoundDelay(), false);
187 GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( SpawnLight, GetLightDelay(), false);
189
191
192 }
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Definition ParticleManager.c:84
void PlayExplosionSound()
Definition FireworksLauncher.c:273
ParticleSource m_ParticleExplosion
Definition FireworksLauncher.c:37
void RequestSecondaryExplosion()
Definition FireworksLauncher.c:194
int GetLightDelay()
Definition FireworksLauncher.c:58
vector GetExplosionPosition()
Definition FireworksLauncher.c:160
int GetExplParticleFromSequence()
Definition FireworksLauncher.c:217
void SpawnLight()
Definition FireworksLauncher.c:267
int GetSoundDelay()
Definition FireworksLauncher.c:53
void Stop()
Legacy function for backwards compatibility with 1.14 and below.
Definition Particle.c:266
proto native CGame GetGame()
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8

Перекрестные ссылки CALL_CATEGORY_SYSTEM, GetExplosionPosition(), GetExplParticleFromSequence(), GetGame(), GetLightDelay(), GetSoundDelay(), m_ParticleAfterBurnEnd, m_ParticleExplosion, ParticleManager(), PlayExplosionSound(), RequestSecondaryExplosion(), SpawnLight() и Particle::Stop().

◆ OnFired()

void OnFired ( )
inlineprotected
118 {
119 m_Timer.Run(GetExplosionDelay(), this, "OnExplode", null);
120 m_Item.PlaySoundSet( m_FireSound, "FireworksLauncher_Shot_SoundSet", 0, 0 );
123
127 m_ShotDir = m_ParticleShot.GetDirectionUp();
128
129 #ifdef DEVELOPER
130 vector pts[2];
131 pts[0] = GetShotPos();
133 //m_ShotTrajectory = Shape.CreateLines(COLOR_RED, ShapeFlags.TRANSP|ShapeFlags.NOOUTLINE|ShapeFlags.NOZBUFFER, pts, 2);
134 #endif
135 }
float GetShotDispersionAngle()
Definition FireworksLauncher.c:68
float GetExplosionDelay()
Definition FireworksLauncher.c:78
ref Timer m_Timer
Definition FireworksLauncher.c:30
ParticleSource m_ParticleShot
Definition FireworksLauncher.c:36
static const int FIREWORKS_AFTERBURN_END
Definition ParticleList.c:305
static const int FIREWORKS_SHOT
Definition ParticleList.c:296
proto native void SetOwner(Class owner)
Set the owner of this ParticleSource.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

Перекрестные ссылки ParticleList::FIREWORKS_AFTERBURN_END, ParticleList::FIREWORKS_SHOT, GetExplosionDelay(), GetExplosionDistance(), GetShotDispersionAngle(), GetShotPos(), m_FireSound, m_Item, m_ParticleAfterBurnEnd, m_ParticleShot, m_ShotDir, m_Timer, ParticleManager(), Math::RandomFloatInclusive(), ParticleSource::SetOwner() и Vector().

◆ PlayExplosionSound()

void PlayExplosionSound ( )
inlineprotected
274 {
275 if (m_FireSound)
276 {
278 }
279 m_Item.PlaySoundSet( m_ExplosionSound, GetExplosionSoundSet(), 0, 0 );
280 }
override void Stop()
Stops sound.
Definition EffectSound.c:244
string GetExplosionSoundSet()
Definition FireworksLauncher.c:73

Перекрестные ссылки GetExplosionSoundSet(), m_ExplosionSound, m_FireSound, m_Item и EffectSound::Stop().

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

◆ RequestSecondaryExplosion()

void RequestSecondaryExplosion ( )
inlineprotected
195 {
197 {
200 }
201 }
int GetSecondaryExplosionDelay()
Definition FireworksLauncher.c:212
int m_RemainingExplosions
Definition FireworksLauncher.c:42
void SpawnSecondaryExplosion()
Definition FireworksLauncher.c:203

Перекрестные ссылки CALL_CATEGORY_SYSTEM, GetGame(), GetSecondaryExplosionDelay(), m_RemainingExplosions и SpawnSecondaryExplosion().

Используется в OnExplode(), SpawnSecondaryExplosion() и AnniversaryFireworksLauncherClientEvent::SpawnSecondaryExplosion().

◆ SetupLight()

void SetupLight ( PointLightBase light)
inlineprotected
238 {
239 switch (m_Color)
240 {
241 case "R":
242 light.SetDiffuseColor(255,51,51);
243 light.SetAmbientColor(255,51,51);
244
245 break;
246 case "G":
247 light.SetDiffuseColor(0,255,128);
248 light.SetAmbientColor(0,255,128);
249 break;
250 case "B":
251 light.SetDiffuseColor(51,153,255);
252 light.SetAmbientColor(51,153,255);
253 break;
254 case "Y":
255 light.SetDiffuseColor(255,255,51);
256 light.SetAmbientColor(255,255,51);
257 break;
258 case "P":
259 light.SetDiffuseColor(255,102,255);
260 light.SetAmbientColor(255,102,255);
261 break;
262 default:
263 ErrorEx("Incorrect explosion particle color in the sequence");
264 }
265 }

Перекрестные ссылки ErrorEx и m_Color.

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

◆ SpawnLight()

void SpawnLight ( )
inlineprotected
268 {
271 }
Definition FireworksLauncher.c:2
ExplosionLight m_ExplosionLight
Definition FireworksLauncher.c:39
void SetupLight(PointLightBase light)
Definition FireworksLauncher.c:237
Definition PointLightBase.c:2

Перекрестные ссылки GetExplosionPosition(), m_ExplosionLight и SetupLight().

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

◆ SpawnSecondaryExplosion()

void SpawnSecondaryExplosion ( )
inlineprotected
204 {
207 evnt.OnExplode();
208 m_Events.Insert(evnt);
210 }
ref array< ref FireworksLauncherClientEventBase > m_Events
Definition FireworksLauncher.c:43

Перекрестные ссылки GetExplosionPosition(), m_Events, m_Index, m_Item и RequestSecondaryExplosion().

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

Поля

◆ m_Color

◆ m_Events

ref array<ref FireworksLauncherClientEventBase> m_Events = new ref array<ref FireworksLauncherClientEventBase>
protected

◆ m_ExplosionLight

ExplosionLight m_ExplosionLight
protected

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

◆ m_ExplosionPos

vector m_ExplosionPos
protected

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

◆ m_ExplosionSound

EffectSound m_ExplosionSound
protected

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

◆ m_FireSound

EffectSound m_FireSound
protected

◆ m_Index

◆ m_Item

◆ m_ParticleAfterBurnEnd

ParticleSource m_ParticleAfterBurnEnd
protected

Используется в OnExplode(), OnFired() и ~FireworksLauncherClientEvent().

◆ m_ParticleExplosion

ParticleSource m_ParticleExplosion
protected

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

◆ m_ParticleShot

ParticleSource m_ParticleShot
protected

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

◆ m_RemainingExplosions

int m_RemainingExplosions = GetSecondaryExplosionCount()
protected

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

◆ m_ShotDir

vector m_ShotDir
protected

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

◆ m_Timer

ref Timer m_Timer = new Timer()
protected

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


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