ShootingStart
How do I use Shooting Start
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
82 | ShootingStart(); | 1 |
87 | ShootingStart(); | 2 |
115 | void ShootingStart() | 3 |
File name: Enemy.cs
Copy
66 public void Activation(Vector3 revealPosition, Vector3 _moveDirection)
67 {
68 transform.position = revealPosition;
69
70 if (enemyType == 2)
71 {
72 moveDirection = _moveDirection;
73 movingSpeed = 2;
74 }
75 else if (enemyType == 3)
76 {
77 movingSpeed = 1.2f;
78 }
79
80 life = lifeMax;
81
82 ShootingStart();
83 }
File name: Enemy.cs
Copy
115 void ShootingStart()
116 {
117 switch (enemyType)
118 {
119 case 1: StartCoroutine("ShootingRoutine_01"); break;
120 case 2: StartCoroutine("ShootingRoutine_02"); break;
121 case 3: StartCoroutine("ShootingRoutine_03"); break;
122 case 4: StartCoroutine("ShootingRoutine_04"); break;
123 }
124 }
ShootingStart 132 lượt xem
Gõ tìm kiếm nhanh...