-
Notifications
You must be signed in to change notification settings - Fork 0
/
cBullet.h
1314 lines (1025 loc) · 54 KB
/
cBullet.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
///////////////////////////////////////////////////////
//*-------------------------------------------------*//
//| Part of Project One (https://www.maus-games.at) |//
//*-------------------------------------------------*//
//| Copyright (c) 2010 Martin Mauersics |//
//| Released under the zlib License |//
//*-------------------------------------------------*//
///////////////////////////////////////////////////////
#pragma once
#ifndef _P1_GUARD_BULLET_H_
#define _P1_GUARD_BULLET_H_
// TODO 3: add memory pool for bullets, instead of always reallocating
// TODO 3: remove tons of template instantiations (also enemies ? other templates ?) (CreateBullet and AllocateEnemy create tons of symbols)
// TODO 3: sort bullet classes (color, enemy<>player, normal<>special), improve array indexing and caching
// TODO 2: lots of bullets with direction-outlines can create holes in outlines by nearly-invisible backsides (can this even be fixed ?)
// TODO 3: reorder bullets either yellow->green or green->yellow, so they are overlapping consistently (in default order)
// TODO 4: surge-bullets to wave-weapon, rename one of it (probably wave-weapon to surge-weapon, code-only anyway)
// TODO 4: ID 0 is not used
// TODO 4: check if ForEachBullet or ForEachBulletTypes is faster, and adjust all use-cases accordingly (also FindBullet* and GetNumBullets*)
// TODO 4: grow bullet code could be moved out of NevoMission to a GlobalMove function
// TODO 3: implement reserve-function, called before large bullet-requests >=100 (same for enemies, for every squad?)
// TODO 3: player bullets in the air (when jumping) overlap each other strangely (transparency of old bullets cover new bullets) and own outlines are sometimes rendered above
// ****************************************************************
// bullet definitions
#define BULLET_SET_COUNT (20u) //
#define BULLET_SPEED_FACTOR (30.0f) //
#define BULLET_DEPTH_FACTOR (0.8f) //
#define BULLET_COLLISION_FACTOR (0.6f) // (for enemy bullets)
#define BULLET_SHADER_ATTRIBUTE_DEPTH "a_v1Depth"
#define BULLET_SHADER_ATTRIBUTE_DEPTH_NUM (CORE_SHADER_ATTRIBUTE_USER_NUM + 0u)
enum eBulletStatus : coreUint8
{
BULLET_STATUS_READY = 0x01u, // bullet is ready to be created
BULLET_STATUS_ACTIVE = 0x02u, // bullet is currently flying around, doing stuff (no checking required, is managed)
BULLET_STATUS_REFLECTED = 0x04u, //
BULLET_STATUS_PENETRATE = 0x08u, // TODO 1: remove
BULLET_STATUS_IMMORTAL = 0x10u, //
BULLET_STATUS_GHOST = 0x20u, //
BULLET_STATUS_FRESH = 0x40u //
};
// ****************************************************************
// bullet interface
class INTERFACE cBullet : public coreObject3D
{
protected:
coreInt32 m_iDamage; // damage value
coreFloat m_fSpeed; //
cShip* m_pOwner; // associated owner of the bullet
coreFloat m_fDepth; //
coreFlow m_fAnimation; // animation value
coreFlow m_fFade; //
coreUint8 m_iElement; //
coreFlow m_fFlyTime; //
coreVector2 m_vFlyDir; //
coreFloat m_fAnimSpeed; //
static cRotaCache s_RotaCache; //
public:
cBullet()noexcept;
virtual ~cBullet()override = default;
FRIEND_CLASS(cBulletManager)
ENABLE_COPY (cBullet)
ENABLE_ID
// move the bullet
void Move()final;
// control status
void Activate (const coreInt32 iDamage, const coreFloat fSpeed, cShip* pOwner, const coreVector2 vPosition, const coreVector2 vDirection, const coreInt32 iType);
void Deactivate(const coreBool bAnimated, const coreVector2 vImpact, const coreVector2 vForce);
void Deactivate(const coreBool bAnimated, const coreVector2 vImpact);
void Deactivate(const coreBool bAnimated);
//
void Reflect(const coreObject3D* pObject, const coreVector2 vIntersection, const coreVector2 vForceNormal = coreVector2(0.0f,0.0f));
//
void Ignore();
//
inline cBullet* ChangeHeight (const coreFloat fValue) {this->SetPosition (coreVector3(this->GetPosition().xy(), fValue)); return this;} // not related to tilting
inline cBullet* ChangeSize (const coreFloat fFactor) {this->SetSize (this->GetSize () * fFactor); return this;}
inline cBullet* ChangeTexSize (const coreFloat fFactor) {this->SetTexSize (this->GetTexSize() * fFactor); return this;}
inline cBullet* ChangeCollisionModifier(const coreVector3 vValue) {this->SetCollisionModifier(vValue); return this;} // # unhandled/absolute change
// set object properties
inline void SetDamage (const coreInt32 iDamage) {m_iDamage = iDamage;}
inline void SetSpeed (const coreFloat fSpeed) {m_fSpeed = fSpeed * BULLET_SPEED_FACTOR;}
inline void SetFade (const coreFloat fFade) {m_fFade = fFade;}
inline void SetFlyTime(const coreFloat fFlyTime) {m_fFlyTime = fFlyTime;}
inline void SetFlyDir (const coreVector2 vFlyDir) {m_vFlyDir = vFlyDir;}
inline void SetAnimation(const coreFloat fAnimation) {m_fAnimation = fAnimation;}
inline void SetAnimSpeed(const coreFloat fAnimSpeed) {m_fAnimSpeed = fAnimSpeed;}
// get object properties
inline const coreInt32& GetDamage ()const {return m_iDamage;}
inline coreFloat GetSpeed ()const {return m_fSpeed * (1.0f / BULLET_SPEED_FACTOR);}
inline cShip* GetOwner ()const {return m_pOwner;}
inline const coreUint8& GetElement()const {return m_iElement;}
inline const coreFloat& GetFlyTime()const {return m_fFlyTime;}
inline const coreVector2& GetFlyDir ()const {return m_vFlyDir;}
inline coreVector2 GetFlyMove()const {return m_vFlyDir * (m_fSpeed * TIME);}
// bullet configuration values
static inline const coreChar* ConfigProgramInstancedName() {UNREACHABLE return "";}
static inline coreUintW ConfigOutlineStyle () {UNREACHABLE return OUTLINE_STYLE_FULL;}
static inline coreBool ConfigShadow () {UNREACHABLE return false;}
static inline coreBool ConfigGlow () {UNREACHABLE return false;}
static inline coreUintW ConfigReserve () {UNREACHABLE return 0u;}
//
static void GlobalInit() {}
static void GlobalExit() {}
protected:
// change default color
inline void _MakeWhite (const coreFloat fFactor) {m_iElement = ELEMENT_WHITE; this->__SetColorRand(COLOR_ENERGY_WHITE * fFactor);}
inline void _MakeYellow (const coreFloat fFactor) {m_iElement = ELEMENT_YELLOW; this->__SetColorRand(COLOR_ENERGY_YELLOW * fFactor);}
inline void _MakeOrange (const coreFloat fFactor) {m_iElement = ELEMENT_ORANGE; this->__SetColorRand(COLOR_ENERGY_ORANGE * fFactor);}
inline void _MakeRed (const coreFloat fFactor) {m_iElement = ELEMENT_RED; this->__SetColorRand(COLOR_ENERGY_RED * fFactor);}
inline void _MakeMagenta(const coreFloat fFactor) {m_iElement = ELEMENT_MAGENTA; this->__SetColorRand(COLOR_ENERGY_MAGENTA * fFactor);}
inline void _MakePurple (const coreFloat fFactor) {m_iElement = ELEMENT_PURPLE; this->__SetColorRand(COLOR_ENERGY_PURPLE * fFactor);}
inline void _MakeBlue (const coreFloat fFactor) {m_iElement = ELEMENT_BLUE; this->__SetColorRand(COLOR_ENERGY_BLUE * fFactor);}
inline void _MakeCyan (const coreFloat fFactor) {m_iElement = ELEMENT_CYAN; this->__SetColorRand(COLOR_ENERGY_CYAN * fFactor);}
inline void _MakeGreen (const coreFloat fFactor) {m_iElement = ELEMENT_GREEN; this->__SetColorRand(COLOR_ENERGY_GREEN * fFactor);}
//
void _EnableDepth(const coreProgramPtr& pProgram)const;
void _EnableDepth()const;
private:
// own routines for derived classes (render functions executed by manager)
virtual void __ImpactOwn (const coreVector2 vImpact, const coreVector2 vForce) {}
virtual void __ReflectOwn () {}
virtual void __RenderOwnBefore() {}
virtual void __RenderOwnAfter () {}
virtual void __MoveOwn () {}
//
inline void __SetColorRand(const coreVector3 vColor) {this->SetColor3(vColor * Core::Rand->Float(0.8f, 1.0f));}
};
// ****************************************************************
// bullet manager class
class cBulletManager final
{
private:
// bullet set structure
struct INTERFACE sBulletSetGen
{
coreBatchList oBulletActive; // list with active bullets
coreUintW iCurBullet; // current bullet (next one to check in pool)
coreUintW iOutline;
sBulletSetGen()noexcept;
virtual ~sBulletSetGen() = default;
};
template <typename T> struct sBulletSet final : public sBulletSetGen
{
coreList<T> aBulletPool; // semi-dynamic container with all bullets
explicit sBulletSet(cOutline* pOutline)noexcept;
~sBulletSet()final;
};
private:
sBulletSetGen* m_apBulletSet[BULLET_SET_COUNT]; // bullet sets (each for a different inherited bullet class)
cOutline m_Outline; //
coreInt32 m_iType; //
coreUint8 m_aiOrder[BULLET_SET_COUNT]; //
public:
explicit cBulletManager(const coreInt32 iType)noexcept;
~cBulletManager();
DISABLE_COPY(cBulletManager)
// render and move the bullet manager
void Render();
void RenderAfter();
void Move();
// add and remove bullets
template <typename T> RETURN_RESTRICT T* AddBullet(const coreInt32 iDamage, const coreFloat fSpeed, cShip* pOwner, const coreVector2 vPosition, const coreVector2 vDirection);
void ClearBullets(const coreBool bAnimated);
template <typename T> void ClearBulletsTyped(const coreBool bAnimated);
//
inline cBullet* FindBullet (const coreVector2 vPosition)const;
template <typename T> T* FindBulletTyped(const coreVector2 vPosition)const;
template <typename F> FORCE_INLINE void ForEachBullet (F&& nFunction)const; // [](cBullet* OUTPUT pBullet) -> void
template <typename T, typename F> FORCE_INLINE void ForEachBulletTyped(F&& nFunction)const; // [](T* OUTPUT pBullet) -> void
//
template <typename T> void PrefetchBullet();
template <typename T> void ReserveBullet(const coreUintW iNumBullets);
//
void OverrideOrder(const coreUint8* piNewOrder, const coreUintW iSize);
void ResetOrder();
//
inline coreUintW GetNumBullets ()const {coreUintW iNum = 0u; this->ForEachBullet ([&](void*) {++iNum;}); return iNum;}
template <typename T> inline coreUintW GetNumBulletsTyped ()const {coreUintW iNum = 0u; this->ForEachBulletTyped<T>([&](void*) {++iNum;}); return iNum;}
inline coreUintW GetNumBulletsEst ()const {return Core::Manager::Object->GetObjectList(m_iType).size();} // can spike on bullet-reallocation
template <typename T> inline coreUintW GetNumBulletsTypedEst()const {return m_apBulletSet[T::ID] ? m_apBulletSet[T::ID]->oBulletActive.GetSize() : 0u;}
};
// ****************************************************************
// ray bullet class
// TODO 1: split up ray-bullet for normal and gravity
class cRayBullet final : public cBullet
{
private:
coreFloat m_fScale; //
public:
cRayBullet()noexcept;
ENABLE_COPY(cRayBullet)
ASSIGN_ID(1, "Ray")
// reset base properties
inline void ResetProperties() {this->MakeYellow(); this->SetSize(coreVector3(0.0f,0.0f,0.0f)); this->SetTexSize(coreVector2(0.4f,0.2f) * 0.7f); m_fAnimation = 0.09f; m_fFade = 0.0f; m_fScale = 1.0f;}
//
inline cRayBullet* ChangeScale(const coreFloat fScale) {m_fScale = fScale; return this;}
// change default color
inline cRayBullet* MakeWhite () {this->_MakeWhite (0.8f); return this;}
inline cRayBullet* MakeYellow () {this->_MakeYellow (1.0f); return this;}
inline cRayBullet* MakeOrange () {this->_MakeOrange (1.0f); return this;}
inline cRayBullet* MakeRed () {this->_MakeRed (1.0f); return this;}
inline cRayBullet* MakeMagenta() {UNREACHABLE return this;}
inline cRayBullet* MakePurple () {this->_MakePurple (1.0f); return this;}
inline cRayBullet* MakeBlue () {this->_MakeBlue (1.0f); return this;}
inline cRayBullet* MakeCyan () {UNREACHABLE return this;}
inline cRayBullet* MakeGreen () {this->_MakeGreen (1.0f); return this;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "effect_energy_bullet_direct_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_BULLET_DIRECT;}
static constexpr coreBool ConfigShadow () {return false;}
static constexpr coreBool ConfigGlow () {return true;}
static constexpr coreUintW ConfigReserve () {return 32u;}
static constexpr coreFloat ConfigSpeed () {return 8.0f;}
private:
// execute own routines
void __ImpactOwn (const coreVector2 vImpact, const coreVector2 vForce)final;
void __ReflectOwn()final;
void __MoveOwn ()final;
};
// ****************************************************************
// pulse bullet class
class cPulseBullet final : public cBullet
{
private:
coreFloat m_fScale; //
public:
cPulseBullet()noexcept;
ENABLE_COPY(cPulseBullet)
ASSIGN_ID(2, "Pulse")
// reset base properties
inline void ResetProperties() {this->MakePurple(); this->SetSize(coreVector3(0.0f,0.0f,0.0f)); this->SetTexSize(coreVector2(0.1f,0.1f)); m_fAnimation = 0.0f; m_fFade = 0.0f; m_fScale = 1.0f;}
//
inline cPulseBullet* ChangeScale(const coreFloat fScale) {m_fScale = fScale; return this;}
// change default color
inline cPulseBullet* MakeWhite () {this->_MakeWhite (0.7f); return this;}
inline cPulseBullet* MakeYellow () {UNREACHABLE return this;}
inline cPulseBullet* MakeOrange () {UNREACHABLE return this;}
inline cPulseBullet* MakeRed () {UNREACHABLE return this;}
inline cPulseBullet* MakeMagenta() {UNREACHABLE return this;}
inline cPulseBullet* MakePurple () {this->_MakePurple (1.0f); return this;}
inline cPulseBullet* MakeBlue () {UNREACHABLE return this;}
inline cPulseBullet* MakeCyan () {UNREACHABLE return this;}
inline cPulseBullet* MakeGreen () {UNREACHABLE return this;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "effect_energy_bullet_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_BULLET_FULL;}
static constexpr coreBool ConfigShadow () {return false;}
static constexpr coreBool ConfigGlow () {return true;}
static constexpr coreUintW ConfigReserve () {return 32u;}
static constexpr coreFloat ConfigSpeed () {return 6.0f;}
private:
// execute own routines
void __ImpactOwn (const coreVector2 vImpact, const coreVector2 vForce)final;
void __ReflectOwn()final;
void __MoveOwn ()final;
};
// ****************************************************************
// surge bullet class
class cSurgeBullet final : public cBullet
{
private:
coreFloat m_fScale; //
public:
cSurgeBullet()noexcept;
ENABLE_COPY(cSurgeBullet)
ASSIGN_ID(3, "Surge")
// reset base properties
inline void ResetProperties() {this->MakeGreen(); this->SetSize(coreVector3(0.0f,0.0f,0.0f)); this->SetTexSize(coreVector2(1.1f,0.25f) * 0.2f); this->SetCollisionModifier(coreVector3(0.8f,1.0f,2.0f)); m_fAnimation = 0.2f; m_fFade = 0.0f; m_fScale = 1.0f;}
//
inline cSurgeBullet* ChangeScale(const coreFloat fScale) {m_fScale = fScale; return this;}
// change default color
inline cSurgeBullet* MakeWhite () {this->_MakeWhite (0.7f); return this;}
inline cSurgeBullet* MakeYellow () {UNREACHABLE return this;}
inline cSurgeBullet* MakeOrange () {UNREACHABLE return this;}
inline cSurgeBullet* MakeRed () {this->_MakeRed (1.0f); return this;}
inline cSurgeBullet* MakeMagenta() {UNREACHABLE return this;}
inline cSurgeBullet* MakePurple () {UNREACHABLE return this;}
inline cSurgeBullet* MakeBlue () {UNREACHABLE return this;}
inline cSurgeBullet* MakeCyan () {UNREACHABLE return this;}
inline cSurgeBullet* MakeGreen () {this->_MakeGreen (1.1f); return this;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "effect_energy_bullet_direct_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_BULLET_DIRECT;}
static constexpr coreBool ConfigShadow () {return false;}
static constexpr coreBool ConfigGlow () {return true;}
static constexpr coreUintW ConfigReserve () {return 32u;}
static constexpr coreFloat ConfigSpeed () {return 6.0f;}
private:
// execute own routines
void __ImpactOwn (const coreVector2 vImpact, const coreVector2 vForce)final;
void __ReflectOwn()final;
void __MoveOwn ()final;
};
// ****************************************************************
// tesla bullet class
class cTeslaBullet final : public cBullet
{
private:
coreFloat m_fScale; //
coreFlow m_fLightningTime; //
coreBool m_bLightningSide; //
public:
cTeslaBullet()noexcept;
ENABLE_COPY(cTeslaBullet)
ASSIGN_ID(4, "Tesla")
// reset base properties
inline void ResetProperties() {this->MakeBlue(); this->SetSize(coreVector3(0.0f,0.0f,0.0f)); this->SetTexSize(coreVector2(0.14f,0.14f)); m_fAnimation = 0.09f; m_fFade = 0.0f; m_fScale = 1.0f; m_fLightningTime = 1.0f;}
//
inline cTeslaBullet* ChangeScale(const coreFloat fScale) {m_fScale = fScale; return this;}
// change default color
inline cTeslaBullet* MakeWhite () {this->_MakeWhite (0.7f); return this;}
inline cTeslaBullet* MakeYellow () {UNREACHABLE return this;}
inline cTeslaBullet* MakeOrange () {UNREACHABLE return this;}
inline cTeslaBullet* MakeRed () {UNREACHABLE return this;}
inline cTeslaBullet* MakeMagenta() {UNREACHABLE return this;}
inline cTeslaBullet* MakePurple () {UNREACHABLE return this;}
inline cTeslaBullet* MakeBlue () {this->_MakeBlue (0.9f); return this;}
inline cTeslaBullet* MakeCyan () {UNREACHABLE return this;}
inline cTeslaBullet* MakeGreen () {UNREACHABLE return this;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "effect_energy_bullet_spheric_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_BULLET_FULL;}
static constexpr coreBool ConfigShadow () {return false;}
static constexpr coreBool ConfigGlow () {return true;}
static constexpr coreUintW ConfigReserve () {return 32u;}
static constexpr coreFloat ConfigSpeed () {return 4.0f;}
private:
// execute own routines
void __ImpactOwn (const coreVector2 vImpact, const coreVector2 vForce)final;
void __ReflectOwn()final;
void __MoveOwn ()final;
};
// ****************************************************************
// final bullet class
class cFinalBullet final : public cBullet
{
private:
coreFloat m_fScale; //
coreVector3 m_vFlyDir3D; //
public:
cFinalBullet()noexcept;
ENABLE_COPY(cFinalBullet)
ASSIGN_ID(19, "Final")
// reset base properties
inline void ResetProperties() {this->SetSize(coreVector3(0.0f,0.0f,0.0f)); this->SetTexSize(coreVector2(0.5f,0.5f) * 0.3f); m_fAnimation = 0.09f; m_fFade = 0.0f; m_fScale = 1.0f;}
//
inline cFinalBullet* SetTiltProperties(const coreVector3 vPosition, const coreVector3 vDirection) {this->SetPosition(vPosition); m_vFlyDir3D = vDirection; return this;}
//
inline cFinalBullet* ChangeScale(const coreFloat fScale) {m_fScale = fScale; return this;}
// change default color
inline cFinalBullet* MakeWhite() {this->_MakeWhite(0.8f); return this;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "effect_energy_bullet_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_BULLET_FULL;}
static constexpr coreBool ConfigShadow () {return false;}
static constexpr coreBool ConfigGlow () {return false;}
static constexpr coreUintW ConfigReserve () {return 32u;}
static constexpr coreFloat ConfigSpeed () {return 16.0f;}
private:
// execute own routines
void __ImpactOwn(const coreVector2 vImpact, const coreVector2 vForce)final;
void __MoveOwn ()final;
};
// ****************************************************************
// orb bullet class
class cOrbBullet final : public cBullet
{
public:
cOrbBullet()noexcept;
ENABLE_COPY(cOrbBullet)
ASSIGN_ID(5, "Orb")
// reset base properties
inline void ResetProperties() {this->MakeBlue(); this->SetSize(coreVector3(1.6f,1.6f,1.6f) * 1.1f); this->SetTexSize(coreVector2(0.12f,0.12f)); this->SetCollisionModifier(coreVector3(1.0f,1.0f,1.0f) * BULLET_COLLISION_FACTOR); m_fAnimation = 0.0f; m_fFade = 0.0f;}
// change default color
inline cOrbBullet* MakeWhite () {this->_MakeWhite (0.6f); return this;}
inline cOrbBullet* MakeYellow () {UNREACHABLE return this;}
inline cOrbBullet* MakeOrange () {this->_MakeOrange (0.9f); return this;}
inline cOrbBullet* MakeRed () {this->_MakeRed (0.9f); return this;}
inline cOrbBullet* MakeMagenta() {UNREACHABLE return this;}
inline cOrbBullet* MakePurple () {this->_MakePurple (0.9f); return this;}
inline cOrbBullet* MakeBlue () {this->_MakeBlue (1.0f); return this;}
inline cOrbBullet* MakeCyan () {UNREACHABLE return this;}
inline cOrbBullet* MakeGreen () {this->_MakeGreen (0.8f); return this;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "effect_energy_bullet_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_BULLET_FULL;}
static constexpr coreBool ConfigShadow () {return false;}
static constexpr coreBool ConfigGlow () {return true;}
static constexpr coreUintW ConfigReserve () {return 64u;}
private:
// execute own routines
void __ImpactOwn(const coreVector2 vImpact, const coreVector2 vForce)final;
void __MoveOwn ()final;
};
// ****************************************************************
// cone bullet class
class cConeBullet final : public cBullet
{
public:
cConeBullet()noexcept;
ENABLE_COPY(cConeBullet)
ASSIGN_ID(6, "Cone")
// reset base properties
inline void ResetProperties() {this->MakeOrange(); this->SetSize(coreVector3(1.35f,1.55f,1.35f) * 1.05f); this->SetTexSize(coreVector2(0.5f,0.2f) * 1.3f); this->SetCollisionModifier(coreVector3(1.0f,1.0f,1.0f) * BULLET_COLLISION_FACTOR); m_fAnimation = 0.3f; m_fFade = 0.0f;}
// change default color
inline cConeBullet* MakeWhite () {this->_MakeWhite (0.6f); return this;}
inline cConeBullet* MakeYellow () {this->_MakeYellow (0.8f); return this;}
inline cConeBullet* MakeOrange () {this->_MakeOrange (1.0f); return this;}
inline cConeBullet* MakeRed () {UNREACHABLE return this;}
inline cConeBullet* MakeMagenta() {UNREACHABLE return this;}
inline cConeBullet* MakePurple () {UNREACHABLE return this;}
inline cConeBullet* MakeBlue () {this->_MakeBlue (1.0f); return this;}
inline cConeBullet* MakeCyan () {UNREACHABLE return this;}
inline cConeBullet* MakeGreen () {this->_MakeGreen (1.0f); return this;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "effect_energy_bullet_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_BULLET_DIRECT;}
static constexpr coreBool ConfigShadow () {return false;}
static constexpr coreBool ConfigGlow () {return true;}
static constexpr coreUintW ConfigReserve () {return 64u;}
private:
// execute own routines
void __ImpactOwn (const coreVector2 vImpact, const coreVector2 vForce)final;
void __ReflectOwn()final;
void __MoveOwn ()final;
};
// ****************************************************************
// wave bullet class
class cWaveBullet final : public cBullet
{
public:
cWaveBullet()noexcept;
ENABLE_COPY(cWaveBullet)
ASSIGN_ID(7, "Wave")
// reset base properties
inline void ResetProperties() {this->MakeGreen(); this->SetSize(coreVector3(1.5f,1.5f,1.5f) * 1.3f); this->SetTexSize(coreVector2(1.1f,0.25f) * 0.2f); this->SetCollisionModifier(coreVector3(1.0f,1.0f,1.0f) * BULLET_COLLISION_FACTOR); m_fAnimation = 0.2f; m_fFade = 0.0f;}
// change default color
inline cWaveBullet* MakeWhite () {this->_MakeWhite (0.7f); return this;}
inline cWaveBullet* MakeYellow () {UNREACHABLE return this;}
inline cWaveBullet* MakeOrange () {UNREACHABLE return this;}
inline cWaveBullet* MakeRed () {this->_MakeRed (1.0f); return this;}
inline cWaveBullet* MakeMagenta() {UNREACHABLE return this;}
inline cWaveBullet* MakePurple () {UNREACHABLE return this;}
inline cWaveBullet* MakeBlue () {UNREACHABLE return this;}
inline cWaveBullet* MakeCyan () {UNREACHABLE return this;}
inline cWaveBullet* MakeGreen () {this->_MakeGreen (1.0f); return this;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "effect_energy_bullet_direct_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_BULLET_DIRECT;}
static constexpr coreBool ConfigShadow () {return false;}
static constexpr coreBool ConfigGlow () {return true;}
static constexpr coreUintW ConfigReserve () {return 64u;}
private:
// execute own routines
void __ImpactOwn (const coreVector2 vImpact, const coreVector2 vForce)final;
void __ReflectOwn()final;
void __MoveOwn ()final;
};
// ****************************************************************
// spear bullet class
class cSpearBullet final : public cBullet
{
public:
cSpearBullet()noexcept;
ENABLE_COPY(cSpearBullet)
ASSIGN_ID(8, "Spear")
// reset base properties
inline void ResetProperties() {this->MakeYellow(); this->SetSize(coreVector3(1.45f,1.55f,1.45f) * 2.1f); this->SetTexSize(coreVector2(0.5f,0.2f) * 0.8f); this->SetCollisionModifier(coreVector3(1.0f,1.0f,1.0f) * BULLET_COLLISION_FACTOR); m_fAnimation = 0.15f; m_fFade = 0.0f;}
// change default color
inline cSpearBullet* MakeWhite () {this->_MakeWhite (0.8f); return this;}
inline cSpearBullet* MakeYellow () {this->_MakeYellow (0.9f); return this;}
inline cSpearBullet* MakeOrange () {UNREACHABLE return this;}
inline cSpearBullet* MakeRed () {UNREACHABLE return this;}
inline cSpearBullet* MakeMagenta() {UNREACHABLE return this;}
inline cSpearBullet* MakePurple () {UNREACHABLE return this;}
inline cSpearBullet* MakeBlue () {UNREACHABLE return this;}
inline cSpearBullet* MakeCyan () {UNREACHABLE return this;}
inline cSpearBullet* MakeGreen () {UNREACHABLE return this;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "effect_energy_bullet_direct_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_BULLET_DIRECT;}
static constexpr coreBool ConfigShadow () {return false;}
static constexpr coreBool ConfigGlow () {return true;}
static constexpr coreUintW ConfigReserve () {return 64u;}
private:
// execute own routines
void __ImpactOwn (const coreVector2 vImpact, const coreVector2 vForce)final;
void __ReflectOwn()final;
void __MoveOwn ()final;
};
// ****************************************************************
// triangle bullet class
class cTriangleBullet final : public cBullet
{
public:
cTriangleBullet()noexcept;
ENABLE_COPY(cTriangleBullet)
ASSIGN_ID(9, "Triangle")
// reset base properties
inline void ResetProperties() {this->MakeRed(); this->SetSize(coreVector3(1.5f,1.5f,1.5f)); this->SetTexSize(coreVector2(0.5f,0.2f)); this->SetCollisionModifier(coreVector3(1.0f,1.0f,1.0f) * BULLET_COLLISION_FACTOR); m_fAnimation = 0.0f; m_fFade = 0.0f;}
// change default color
inline cTriangleBullet* MakeWhite () {this->_MakeWhite (0.7f); return this;}
inline cTriangleBullet* MakeYellow () {UNREACHABLE return this;}
inline cTriangleBullet* MakeOrange () {UNREACHABLE return this;}
inline cTriangleBullet* MakeRed () {this->_MakeRed (1.0f); return this;}
inline cTriangleBullet* MakeMagenta() {UNREACHABLE return this;}
inline cTriangleBullet* MakePurple () {this->_MakePurple (1.0f); return this;}
inline cTriangleBullet* MakeBlue () {UNREACHABLE return this;}
inline cTriangleBullet* MakeCyan () {UNREACHABLE return this;}
inline cTriangleBullet* MakeGreen () {UNREACHABLE return this;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "effect_energy_bullet_direct_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_BULLET_FULL;}
static constexpr coreBool ConfigShadow () {return false;}
static constexpr coreBool ConfigGlow () {return true;}
static constexpr coreUintW ConfigReserve () {return 64u;}
private:
// execute own routines
void __ImpactOwn(const coreVector2 vImpact, const coreVector2 vForce)final;
void __MoveOwn ()final;
};
// ****************************************************************
// flip bullet class
class cFlipBullet final : public cBullet
{
public:
cFlipBullet()noexcept;
ENABLE_COPY(cFlipBullet)
ASSIGN_ID(10, "Flip")
// reset base properties
inline void ResetProperties() {this->MakePurple(); this->SetSize(coreVector3(2.6f,2.0f,2.6f)); this->SetTexSize(coreVector2(0.4f,0.2f)); this->SetCollisionModifier(coreVector3(1.0f,1.0f,1.0f) * BULLET_COLLISION_FACTOR); m_fAnimation = 0.0f; m_fFade = 0.0f;}
// change default color
inline cFlipBullet* MakeWhite () {this->_MakeWhite (0.6f); return this;}
inline cFlipBullet* MakeYellow () {UNREACHABLE return this;}
inline cFlipBullet* MakeOrange () {UNREACHABLE return this;}
inline cFlipBullet* MakeRed () {UNREACHABLE return this;}
inline cFlipBullet* MakeMagenta() {UNREACHABLE return this;}
inline cFlipBullet* MakePurple () {this->_MakePurple (1.0f); return this;}
inline cFlipBullet* MakeBlue () {UNREACHABLE return this;}
inline cFlipBullet* MakeCyan () {UNREACHABLE return this;}
inline cFlipBullet* MakeGreen () {UNREACHABLE return this;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "effect_energy_bullet_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_BULLET_FULL;}
static constexpr coreBool ConfigShadow () {return false;}
static constexpr coreBool ConfigGlow () {return true;}
static constexpr coreUintW ConfigReserve () {return 64u;}
private:
// execute own routines
void __ImpactOwn(const coreVector2 vImpact, const coreVector2 vForce)final;
void __MoveOwn ()final;
};
// ****************************************************************
// quad bullet class
class cQuadBullet final : public cBullet
{
public:
cQuadBullet()noexcept;
ENABLE_COPY(cQuadBullet)
ASSIGN_ID(11, "Quad")
// reset base properties
inline void ResetProperties() {this->MakeCyan(); this->SetSize(coreVector3(1.5f,1.5f,1.5f)); this->SetTexSize(coreVector2(0.5f,0.2f)); this->SetCollisionModifier(coreVector3(1.0f,1.0f,1.0f) * BULLET_COLLISION_FACTOR); m_fAnimation = 0.0f; m_fFade = 0.0f;}
// change default color
inline cQuadBullet* MakeWhite () {this->_MakeWhite (0.7f); return this;}
inline cQuadBullet* MakeYellow () {UNREACHABLE return this;}
inline cQuadBullet* MakeOrange () {UNREACHABLE return this;}
inline cQuadBullet* MakeRed () {this->_MakeRed (1.0f); return this;}
inline cQuadBullet* MakeMagenta() {UNREACHABLE return this;}
inline cQuadBullet* MakePurple () {this->_MakePurple (1.0f); return this;}
inline cQuadBullet* MakeBlue () {UNREACHABLE return this;}
inline cQuadBullet* MakeCyan () {this->_MakeCyan (0.9f); return this;}
inline cQuadBullet* MakeGreen () {UNREACHABLE return this;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "effect_energy_bullet_direct_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_BULLET_FULL;}
static constexpr coreBool ConfigShadow () {return false;}
static constexpr coreBool ConfigGlow () {return true;}
static constexpr coreUintW ConfigReserve () {return 64u;}
private:
// execute own routines
void __ImpactOwn(const coreVector2 vImpact, const coreVector2 vForce)final;
void __MoveOwn ()final;
};
// ****************************************************************
// view bullet class
class cViewBullet final : public cBullet
{
public:
cViewBullet()noexcept;
ENABLE_COPY(cViewBullet)
ASSIGN_ID(12, "View")
// reset base properties
inline void ResetProperties() {this->MakeMagenta(); this->SetSize(coreVector3(1.0f,3.0f,1.0f)); this->SetTexSize(coreVector2(0.2f,0.2f)); this->SetCollisionModifier(coreVector3(1.0f,1.0f,1.0f) * BULLET_COLLISION_FACTOR); m_fAnimation = 0.0f; m_fFade = 0.0f;}
// change default color
inline cViewBullet* MakeWhite () {this->_MakeWhite (0.7f); return this;}
inline cViewBullet* MakeYellow () {UNREACHABLE return this;}
inline cViewBullet* MakeOrange () {UNREACHABLE return this;}
inline cViewBullet* MakeRed () {UNREACHABLE return this;}
inline cViewBullet* MakeMagenta() {this->_MakeMagenta(1.0f); return this;}
inline cViewBullet* MakePurple () {UNREACHABLE return this;}
inline cViewBullet* MakeBlue () {UNREACHABLE return this;}
inline cViewBullet* MakeCyan () {UNREACHABLE return this;}
inline cViewBullet* MakeGreen () {UNREACHABLE return this;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "effect_energy_bullet_direct_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_BULLET_DIRECT;}
static constexpr coreBool ConfigShadow () {return false;}
static constexpr coreBool ConfigGlow () {return true;}
static constexpr coreUintW ConfigReserve () {return 64u;}
private:
// execute own routines
void __ImpactOwn (const coreVector2 vImpact, const coreVector2 vForce)final;
void __ReflectOwn()final;
void __MoveOwn ()final;
};
// ****************************************************************
// card bullet class
class cCardBullet final : public cBullet
{
public:
cCardBullet()noexcept;
ENABLE_COPY(cCardBullet)
ASSIGN_ID(13, "Card")
// reset base properties
inline void ResetProperties() {this->MakeWhite(); this->SetSize(coreVector3(1.5f,1.5f,1.5f)); this->SetTexSize(coreVector2(0.5f,0.2f)); m_fAnimation = 0.0f; m_fFade = 0.0f;}
// change default color
inline cCardBullet* MakeWhite () {this->_MakeWhite (0.5f); return this;}
inline cCardBullet* MakeYellow () {UNREACHABLE return this;}
inline cCardBullet* MakeOrange () {UNREACHABLE return this;}
inline cCardBullet* MakeRed () {this->_MakeRed (1.0f); return this;}
inline cCardBullet* MakeMagenta() {UNREACHABLE return this;}
inline cCardBullet* MakePurple () {this->_MakePurple (1.0f); return this;}
inline cCardBullet* MakeBlue () {UNREACHABLE return this;}
inline cCardBullet* MakeCyan () {this->_MakeCyan (0.9f); return this;}
inline cCardBullet* MakeGreen () {this->_MakeGreen (0.8f); return this;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "effect_energy_bullet_invert_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_BULLET_FULL;}
static constexpr coreBool ConfigShadow () {return false;}
static constexpr coreBool ConfigGlow () {return true;}
static constexpr coreUintW ConfigReserve () {return 8u;}
private:
// execute own routines
void __ImpactOwn(const coreVector2 vImpact, const coreVector2 vForce)final;
void __MoveOwn ()final;
};
// ****************************************************************
// debris bullet class
class cDebrisBullet final : public cBullet
{
private:
static coreObject3D s_Wave; //
public:
cDebrisBullet()noexcept;
ENABLE_COPY(cDebrisBullet)
ASSIGN_ID(14, "Debris")
// reset base properties
inline void ResetProperties() {this->SetSize(coreVector3(2.4f,2.4f,2.4f)); m_fAnimation = 0.0f; m_fFade = 0.0f;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "object_meteor_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_FULL;}
static constexpr coreBool ConfigShadow () {return true;}
static constexpr coreBool ConfigGlow () {return true;}
static constexpr coreUintW ConfigReserve () {return 8u;}
//
static void GlobalInit();
static void GlobalExit();
private:
// execute own routines
void __ImpactOwn (const coreVector2 vImpact, const coreVector2 vForce)final;
void __RenderOwnBefore()final;
void __MoveOwn ()final;
};
// ****************************************************************
// mine bullet class
class cMineBullet final : public cBullet
{
private:
static coreObject3D s_Wave; //
public:
cMineBullet()noexcept;
ENABLE_COPY(cMineBullet)
ASSIGN_ID(15, "Mine")
// reset base properties
inline void ResetProperties() {this->SetSize(coreVector3(2.4f,2.4f,2.4f)); m_fAnimation = 0.0f; m_fFade = 0.0f;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "object_ship_glow_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_FULL;}
static constexpr coreBool ConfigShadow () {return true;}
static constexpr coreBool ConfigGlow () {return true;}
static constexpr coreUintW ConfigReserve () {return 16u;}
//
static void GlobalInit();
static void GlobalExit();
private:
// execute own routines
void __ImpactOwn (const coreVector2 vImpact, const coreVector2 vForce)final;
void __RenderOwnBefore()final;
void __MoveOwn ()final;
};
// ****************************************************************
// rocket bullet class
class cRocketBullet final : public cBullet
{
private:
const cShip* m_pTarget; //
public:
cRocketBullet()noexcept;
ENABLE_COPY(cRocketBullet)
ASSIGN_ID(16, "Rocket")
// reset base properties
inline void ResetProperties() {this->SetSize(coreVector3(1.8f,1.8f,1.8f)); m_fAnimation = 0.0f; m_fFade = 0.0f; m_pTarget = NULL;}
//
inline cRocketBullet* SetTarget(const cShip* pTarget) {m_pTarget = pTarget; return this;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "object_ship_glow_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_FULL;}
static constexpr coreBool ConfigShadow () {return true;}
static constexpr coreBool ConfigGlow () {return true;}
static constexpr coreUintW ConfigReserve () {return 16u;}
private:
// execute own routines
void __ImpactOwn (const coreVector2 vImpact, const coreVector2 vForce)final;
void __ReflectOwn()final;
void __MoveOwn ()final;
};
// ****************************************************************
// grow bullet class
class cGrowBullet final : public cBullet
{
public:
cGrowBullet()noexcept;
ENABLE_COPY(cGrowBullet)
ASSIGN_ID(17, "Grow")
// reset base properties
inline void ResetProperties() {this->MakeBlue(); this->SetSize(coreVector3(1.6f,1.6f,1.6f) * 1.1f); this->SetTexSize(coreVector2(0.12f,0.12f) * 3.0f); this->SetCollisionModifier(coreVector3(1.0f,1.0f,1.0f) * 0.95f); m_fAnimation = 0.0f; m_fFade = 0.0f;}
// change default color
inline cGrowBullet* MakeWhite () {UNREACHABLE return this;}
inline cGrowBullet* MakeYellow () {UNREACHABLE return this;}
inline cGrowBullet* MakeOrange () {this->_MakeOrange (0.9f); return this;}
inline cGrowBullet* MakeRed () {this->_MakeRed (0.9f); return this;}
inline cGrowBullet* MakeMagenta() {UNREACHABLE return this;}
inline cGrowBullet* MakePurple () {UNREACHABLE return this;}
inline cGrowBullet* MakeBlue () {this->_MakeBlue (1.0f); return this;}
inline cGrowBullet* MakeCyan () {UNREACHABLE return this;}
inline cGrowBullet* MakeGreen () {UNREACHABLE return this;}
// bullet configuration values
static constexpr const coreChar* ConfigProgramInstancedName() {return "effect_energy_bullet_spheric_inst_program";}
static constexpr coreUintW ConfigOutlineStyle () {return OUTLINE_STYLE_BULLET_FULL;}
static constexpr coreBool ConfigShadow () {return false;}
static constexpr coreBool ConfigGlow () {return true;}
static constexpr coreUintW ConfigReserve () {return 64u;}
private:
// execute own routines
void __ImpactOwn(const coreVector2 vImpact, const coreVector2 vForce)final;
void __MoveOwn ()final;
};
// ****************************************************************
// tilt bullet class
class cTiltBullet final : public cBullet
{
private:
coreVector3 m_vFlyDir3D; //
public:
cTiltBullet()noexcept;
ENABLE_COPY(cTiltBullet)
ASSIGN_ID(18, "Tilt")
// reset base properties
inline void ResetProperties() {this->MakeWhite(); this->SetSize(coreVector3(1.6f,1.6f,1.6f) * 1.1f); this->SetTexSize(coreVector2(0.12f,0.12f)); m_fAnimation = 0.0f; m_fFade = 0.0f;}
//
inline cTiltBullet* SetTiltProperties(const coreVector3 vPosition, const coreVector3 vDirection) {this->SetPosition(vPosition); m_vFlyDir3D = vDirection; return this;}
//
inline void SetFlyDir3D(const coreVector3 vFlyDir3D) {m_vFlyDir3D = vFlyDir3D;}
//
inline const coreVector3& GetFlyDir3D()const {return m_vFlyDir3D;}