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

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

bool UsesGlobalDeploy ()
 
override bool IsDeployable ()
 
override float GetDeployTime ()
 how long it takes to deploy this item in seconds
 
void SetupColorSequences ()
 
string GetColorSequence ()
 
void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
float GetMaxAllowedWetness ()
 
float GetEventDelay ()
 
string GetFuseSoundSet ()
 
int GetMaxShots ()
 
float GetFuseDelay ()
 
string GetAmmoType ()
 
int GetDamageType ()
 
void OnStateChangedServer (EFireworksState currentState)
 
void OnStateChangedClient (EFireworksState currentState)
 
override void OnIgnitedThis (EntityAI fire_source)
 Executed on Server when some item ignited this one.
 
bool CanPutInCargo (EntityAI parent)
 
bool CanPutIntoHands (EntityAI parent)
 
void OnFuseIgnitedServer ()
 
void OnFuseIgnitedClient ()
 
void OnFiringStartServer ()
 
void OnFiringStartClient ()
 
void OnFiringStop ()
 
void RestartEventTimer ()
 Starts event timer.
 
bool IsIgnited ()
 
bool CanIgniteItem (EntityAI ignite_target=NULL)
 
void OnEventServer (int type)
 Called periodically but only after the entity gets ignited.
 
void OnIndexChangedClient ()
 
FireworksLauncherClientEventBase SpawnEvent ()
 
void OnVariablesSynchronized ()
 
void OnStoreSave (ParamsWriteContext ctx)
 
bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override string GetDeploySoundset ()
 
override string GetLoopDeploySoundset ()
 

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

void FireworksLauncher ()
 
void ~FireworksLauncher ()
 

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

int m_Index
 
int m_IndexPrev
 
int m_ColorSequenceIndex
 
ref Timer m_TimerFuse
 
ref array< ref FireworksLauncherClientEventBase > m_Events
 
EffectSound m_FuseSoundStart
 
EffectSound m_FuseSound
 
ParticleSource m_ParticleFuse
 
ParticleSource m_ParticleAfterBurnEnd
 
ref array< stringm_ColorSequence
 

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

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

◆ FireworksLauncher()

void FireworksLauncher ( )
inlineprivate
333 {
336 RegisterNetSyncVariableInt("m_State", 0, EnumTools.GetLastEnumValue(EFireworksState));
337 RegisterNetSyncVariableInt("m_Index", 0, GetMaxShots());
338 RegisterNetSyncVariableInt("m_RandomSeed", 0, 1023);
339 int lastIndex = m_ColorSequence.Count() - 1;
340 RegisterNetSyncVariableInt("m_ColorSequenceIndex", 0, lastIndex);
341 m_RandomSeed = Math.RandomInt(0,1023);
343 }
EFireworksState
Definition FireworksBase.c:3
int m_RandomSeed
Definition FireworksBase.c:16
Definition EnConvert.c:590
static int GetLastEnumValue(typename e)
Return amount of values in enum.
Definition EnConvert.c:647
void SetupColorSequences()
Definition FireworksLauncher.c:367
int m_ColorSequenceIndex
Definition FireworksLauncher.c:323
int GetMaxShots()
Definition FireworksLauncher.c:425
ref array< string > m_ColorSequence
Definition FireworksLauncher.c:330
Definition EnMath.c:7
Definition EntityAI.c:95
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
Definition EnMath.c:54

Перекрестные ссылки EnumTools::GetLastEnumValue(), GetMaxShots(), m_ColorSequence, m_ColorSequenceIndex, m_RandomSeed, Math::RandomInt(), Math::RandomIntInclusive() и SetupColorSequences().

◆ ~FireworksLauncher()

void ~FireworksLauncher ( )
inlineprivate
346 {
349 }
EffectSound m_FuseSoundStart
Definition FireworksLauncher.c:326
EffectSound m_FuseSound
Definition FireworksLauncher.c:327
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:267

Перекрестные ссылки SEffectManager::DestroyEffect(), m_FuseSound и m_FuseSoundStart.

Методы

◆ CanIgniteItem()

bool CanIgniteItem ( EntityAI ignite_target = NULL)
inlineprotected
582 {
583 return false;
584 }

◆ CanPutInCargo()

bool CanPutInCargo ( EntityAI parent)
inlineprotected
499 {
500 return (GetState() == EFireworksState.DEFAULT || (GetState() == EFireworksState.PLACED) || (GetState() == EFireworksState.FINISHED);
501 }
proto native int GetState()
returns one of STATE_...
Definition StaminaHandler.c:29

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

◆ CanPutIntoHands()

bool CanPutIntoHands ( EntityAI parent)
inlineprotected
504 {
505 return (GetState() == EFireworksState.DEFAULT || (GetState() == EFireworksState.PLACED) || (GetState() == EFireworksState.FINISHED);
506 }

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

◆ GetAmmoType()

string GetAmmoType ( )
inlineprotected
436 {
437 return "Fireworks_Ammo";
438 }

Используется в OnEventServer() и Anniversary_FireworksLauncher::OnEventServer().

◆ GetColorSequence()

string GetColorSequence ( )
inlineprotected
384 {
385 if (m_ColorSequence.IsValidIndex(m_ColorSequenceIndex))
386 {
388 }
389 else
390 {
391 ErrorEx("Failed to obtain color sequence");
392 return "RYPBYYPBRGBYPBRGBRBGBPBRGRGBRBGRYPYR";
393 }
394 }
enum ShapeType ErrorEx

Перекрестные ссылки ErrorEx, m_ColorSequence и m_ColorSequenceIndex.

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

◆ GetDamageType()

int GetDamageType ( )
inlineprotected
441 {
442 return DamageType.EXPLOSION;
443 }
DamageType
exposed from C++ (do not change)
Definition DamageSystem.c:11

Используется в OnEventServer() и Anniversary_FireworksLauncher::OnEventServer().

◆ GetDeploySoundset()

override string GetDeploySoundset ( )
inlineprotected
672 {
673 return "placeFireworks_SoundSet";
674 }

◆ GetDeployTime()

override float GetDeployTime ( )
inlineprotected

how long it takes to deploy this item in seconds

363 {
364 return 2;
365 }

◆ GetEventDelay()

float GetEventDelay ( )
inlineprotected
416 {
417 return Math.RandomFloatInclusive(3,3.35);
418 }
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().

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

◆ GetFuseDelay()

float GetFuseDelay ( )
inlineprotected
431 {
432 return 3;
433 }

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

◆ GetFuseSoundSet()

string GetFuseSoundSet ( )
inlineprotected
421 {
422 return "FireworksLauncher_Ignition_Loop_SoundSet";
423 }

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

◆ GetLoopDeploySoundset()

override string GetLoopDeploySoundset ( )
inlineprotected
677 {
678 return "fireworks_deploy_SoundSet";
679 }

◆ GetMaxAllowedWetness()

float GetMaxAllowedWetness ( )
inlineprotected
410 {
412 }
Definition constants.c:615
const float STATE_WET
Definition constants.c:786

Перекрестные ссылки GameConstants::STATE_WET.

◆ GetMaxShots()

int GetMaxShots ( )
inlineprotected
426 {
427 return 16;
428 }

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

◆ IsDeployable()

override bool IsDeployable ( )
inlineprotected
357 {
358 return true;
359 }

◆ IsIgnited()

bool IsIgnited ( )
inlineprotected
577 {
578 return GetState()==EFireworksState.IGNITED;
579 }

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

◆ OnEventServer()

void OnEventServer ( int type)
inlineprotected

Called periodically but only after the entity gets ignited.

590 {
591 m_Index++;
592 DamageSystem.ExplosionDamage(this, NULL, GetAmmoType(), GetPosition(), GetDamageType());
593
594 SetSynchDirty();
595 if (m_Index > GetMaxShots())
596 {
599 SetState(EFireworksState.FINISHED);
600 }
601 else
602 {
604 }
605 }
ref Timer m_TimerEvent
Definition FireworksBase.c:15
void SetState(bool state)
Definition StaminaHandler.c:30
class JsonUndergroundAreaTriggerData GetPosition
Definition UndergroundAreaLoader.c:9
string GetAmmoType()
Definition FireworksLauncher.c:435
void RestartEventTimer()
Starts event timer.
Definition FireworksLauncher.c:566
int m_Index
Definition FireworksLauncher.c:321
int GetDamageType()
Definition FireworksLauncher.c:440

Перекрестные ссылки GetAmmoType(), GetDamageType(), GetMaxShots(), GetPosition, m_Index, m_TimerEvent, RestartEventTimer() и SetState().

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

◆ OnFiringStartClient()

void OnFiringStartClient ( )
inlineprotected
549 {
550 if (m_ParticleFuse)
551 {
553 }
554 if (m_FuseSound)
555 {
557 }
558 }
override void Stop()
Stops sound.
Definition EffectSound.c:244
ParticleSource m_ParticleFuse
Definition FireworksLauncher.c:328
override bool StopParticle(int flags=0)
Method to tell the particle to stop playing.
Definition ParticleSource.c:372

Перекрестные ссылки m_FuseSound, m_ParticleFuse, EffectSound::Stop() и ParticleSource::StopParticle().

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

◆ OnFiringStartServer()

void OnFiringStartServer ( )
inlineprotected
544 {
545 OnEventServer(0);
546 }
void OnEventServer(int type)
Called periodically but only after the entity gets ignited.
Definition FireworksLauncher.c:589

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

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

◆ OnFiringStop()

void OnFiringStop ( )
inlineprotected
561 {
562 SetHealth01("","",0);
563 }

◆ OnFuseIgnitedClient()

void OnFuseIgnitedClient ( )
inlineprotected
515 {
516 m_ParticleFuse = ParticleManager.GetInstance().PlayInWorld(ParticleList.FIREWORKS_FUSE, GetPosition() + "0 0.15 0");
517 if (m_ParticleFuse)
519 PlaySoundSet( m_FuseSoundStart, "FireworksLauncher_Ignition_Start_SoundSet", 0, 0 );
522
523 if (MemoryPointExists("Fuse_Start"))
524 {
525 fuseStart = GetMemoryPointPos("Fuse_Start");
526 fuseStart = ModelToWorld(fuseStart);
527 }
528 if (MemoryPointExists("Fuse_End"))
529 {
530 fuseEnd = GetMemoryPointPos("Fuse_End");
531 fuseEnd = ModelToWorld(fuseEnd);
532 }
533
536 vector ori = fuseDir.VectorToAngles();
537 m_ParticleFuse.SetOrientation(ori);
538 m_ParticleFuse.SetPosition(fuseStart);
539
540 PlaySoundSetLoop( m_FuseSound, GetFuseSoundSet(), 0, 0 );
541 }
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Definition ParticleManager.c:84
string GetFuseSoundSet()
Definition FireworksLauncher.c:420
Definition ParticleList.c:12
static const int FIREWORKS_FUSE
Definition ParticleList.c:292
proto native void SetOwner(Class owner)
Set the owner of this ParticleSource.
Definition EnConvert.c:106

Перекрестные ссылки ParticleList::FIREWORKS_FUSE, GetFuseSoundSet(), GetPosition, m_FuseSound, m_FuseSoundStart, m_ParticleFuse, ParticleManager() и ParticleSource::SetOwner().

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

◆ OnFuseIgnitedServer()

void OnFuseIgnitedServer ( )
inlineprotected
509 {
510 int state = EFireworksState.FIRING;
511 GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( SetState, GetFuseDelay()*1000, false, state);
512 }
float GetFuseDelay()
Definition FireworksLauncher.c:430
proto native CGame GetGame()
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8

Перекрестные ссылки CALL_CATEGORY_SYSTEM, GetFuseDelay(), GetGame() и SetState().

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

◆ OnIgnitedThis()

override void OnIgnitedThis ( EntityAI fire_source)
inlineprotected

Executed on Server when some item ignited this one.

484 {
485 super.OnIgnitedThis(fire_source);
486 if (m_Events)
487 {
488 m_Events.Clear();
489 }
490 m_Index = 0;
491
492 if (m_TimerEvent)
493 {
494 m_TimerEvent.Stop();
495 }
496 }
ref array< ref FireworksLauncherClientEventBase > m_Events
Definition FireworksLauncher.c:325

Перекрестные ссылки m_Events, m_Index и m_TimerEvent.

◆ OnIndexChangedClient()

void OnIndexChangedClient ( )
inlineprotected
608 {
609 if (!m_Events)
610 {
612 }
613 if (m_Index != 0 && m_State == EFireworksState.FIRING)//can only be true when restarting the device during debug calls
614 {
615 FireworksLauncherClientEventBase fireEvent = SpawnEvent();
616 m_Events.Insert(fireEvent);
617 }
618 }
bool m_State
Definition StaminaHandler.c:20
FireworksLauncherClientEventBase SpawnEvent()
Definition FireworksLauncher.c:620

Перекрестные ссылки m_Events, m_Index, m_State и SpawnEvent().

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

◆ OnPlacementComplete()

void OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprotected
398 {
399 super.OnPlacementComplete(player, position, orientation);
400 if (GetGame().IsServer())
401 {
402 if (GetState() == EFireworksState.DEFAULT)
403 {
405 }
406 }
407 }

Перекрестные ссылки GetGame(), GetState() и SetState().

◆ OnStateChangedClient()

void OnStateChangedClient ( EFireworksState currentState)
inlineprotected
467 {
468 switch (currentState)
469 {
470 case EFireworksState.IGNITED:
472 break
473 case EFireworksState.PLACED:
474 break
475 case EFireworksState.FIRING:
477 break
478 default: {};
479 }
480 }
void OnFuseIgnitedClient()
Definition FireworksLauncher.c:514
void OnFiringStartClient()
Definition FireworksLauncher.c:548

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

◆ OnStateChangedServer()

void OnStateChangedServer ( EFireworksState currentState)
inlineprotected
447 {
448 switch (currentState)
449 {
450 case EFireworksState.PLACED:
451 break
452 case EFireworksState.IGNITED:
454 break
455 case EFireworksState.FIRING:
456 HideSelection("cover");
458 break
459 case EFireworksState.FINISHED:
460 HideSelection("cover");//when loading from storage
461 break
462 default: {};
463 }
464 }
void OnFiringStartServer()
Definition FireworksLauncher.c:543
void OnFuseIgnitedServer()
Definition FireworksLauncher.c:508

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

◆ OnStoreLoad()

bool OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected
648 {
649 if (!super.OnStoreLoad(ctx, version))
650 {
651 return false;
652 }
653
654 if (version >= 130)
655 {
656 if (!ctx.Read(m_Index))
657 {
658 return false;
659 }
660
661 if (!ctx.Read(m_State))
662 {
663 return false;
664 }
665
667 }
668 return true;
669 }

Перекрестные ссылки m_Index, m_State и SetState().

◆ OnStoreSave()

void OnStoreSave ( ParamsWriteContext ctx)
inlineprotected
640 {
641 super.OnStoreSave(ctx);
642 ctx.Write(m_Index);
643 ctx.Write(m_State);
644 }

Перекрестные ссылки m_Index и m_State.

◆ OnVariablesSynchronized()

void OnVariablesSynchronized ( )
inlineprotected
628 {
629 super.OnVariablesSynchronized();
630 //Print("index: " + m_Index);
631 if (m_Index != m_IndexPrev)
632 {
636 }
637 }
int m_IndexPrev
Definition FireworksLauncher.c:322
void OnIndexChangedClient()
Definition FireworksLauncher.c:607
static proto int Randomize(int seed)
Sets the seed for the random number generator.

Перекрестные ссылки m_Index, m_IndexPrev, m_RandomSeed, OnIndexChangedClient() и Math::Randomize().

◆ RestartEventTimer()

void RestartEventTimer ( )
inlineprotected

Starts event timer.

567 {
568 if (!m_TimerEvent)
569 {
570 m_TimerEvent = new Timer();
571 }
572 m_TimerEvent.Run(GetEventDelay(), this, "OnEventServer", new Param1<int>(0));
573 }
float GetEventDelay()
Definition FireworksLauncher.c:415
Definition DayZPlayerImplement.c:63

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

Используется в OnEventServer() и Anniversary_FireworksLauncher::OnEventServer().

◆ SetupColorSequences()

void SetupColorSequences ( )
inlineprotected
368 {
369 m_ColorSequence.Insert("RGBYPBRGBRGBYPBRGBRGBYPBRGBPBRGBRGBY");
370 m_ColorSequence.Insert("PGPYPBYPYPBYYPBRPYPBYYPBRGBPBRGRGBRB");
371 m_ColorSequence.Insert("YPBRPYPBYYPBRGBPBRGRGBRBGRPBRGBRYPBY");
372 m_ColorSequence.Insert("YRBGPRYPGRYBGRGRGBRBBYPYPBYRYPGRYGRP");
373 m_ColorSequence.Insert("BGRYPYRPBYYPYRBGPRYPGBYPBRGBPBRGBRGB");
374 m_ColorSequence.Insert("RYGRPBRGBYPBRRPBRGBBRBBYPYPRGBRGBRPY");
375 m_ColorSequence.Insert("GBRGBYRGBYPBRRPBRBYRYPGPYPRGBRGBRPYG");
376 m_ColorSequence.Insert("RYPBYYPBRGBYPBRGBRBGBPBRGRGBRBGRYPYR");
377 m_ColorSequence.Insert("PBRGBYPBRGBRBGBPBRGRGBRBGRYPYRRYPBYY");
378 m_ColorSequence.Insert("RGRGBRBBYPYPBYRYPGRYGRPYRBGPRYPGRYBG");
379 m_ColorSequence.Insert("RBYRYPGPYPRGBRGBRPYGGBRGBYRGBYPBRRPB");
380 m_ColorSequence.Insert("PRGBRGBRPYGGBRRBYRYPGPYGBYRGBYPBRRPB");
381 }

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

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

◆ SpawnEvent()

FireworksLauncherClientEventBase SpawnEvent ( )
inlineprotected
621 {
622 FireworksLauncherClientEventBase evnt = new FireworksLauncherClientEvent(this,m_Index);
623 evnt.OnFired();
624 return evnt;
625 }
Definition FireworksLauncher.c:29

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

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

◆ UsesGlobalDeploy()

bool UsesGlobalDeploy ( )
inlineprotected
352 {
353 return true;
354 }

Поля

◆ m_ColorSequence

◆ m_ColorSequenceIndex

int m_ColorSequenceIndex
private

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

◆ m_Events

ref array<ref FireworksLauncherClientEventBase> m_Events
private

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

◆ m_FuseSound

EffectSound m_FuseSound
private

◆ m_FuseSoundStart

EffectSound m_FuseSoundStart
private

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

◆ m_Index

◆ m_IndexPrev

int m_IndexPrev
private

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

◆ m_ParticleAfterBurnEnd

ParticleSource m_ParticleAfterBurnEnd
private

◆ m_ParticleFuse

ParticleSource m_ParticleFuse
private

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

◆ m_TimerFuse

ref Timer m_TimerFuse
private

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