This repository was archived by the owner on Aug 9, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,6 +69,14 @@ void MakeSureStuffIsInitialized() {
6969 if ( smoothVelocity == null ) {
7070 smoothVelocity = Vector3 . zero ;
7171 }
72+
73+ if ( player . GetComponent < Player > ( ) . isSpaceLike ) {
74+ maxLOSDistance = 30f ;
75+ moveSpeed = 30f ;
76+ } else {
77+ maxLOSDistance = 20f ;
78+ moveSpeed = 20 ;
79+ }
7280 }
7381
7482 void OnCollisionEnter2D ( Collision2D collision ) {
Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ public class RangedEnemy : MonoBehaviour {
1717 Vector3 lastSeenPlayer ;
1818 Vector3 smoothVelocity ;
1919
20+ private void Start ( ) {
21+
22+ }
23+
2024 // Update is called once per frame
2125 void Update ( ) {
2226 MakeSureStuffIsInitialized ( ) ;
@@ -74,6 +78,16 @@ void MakeSureStuffIsInitialized() {
7478 if ( laserPool == null ) {
7579 laserPool = GameObject . FindWithTag ( "Laserpool" ) . GetComponent < GameObjectPool > ( ) ;
7680 }
81+
82+ if ( player . GetComponent < Player > ( ) . isSpaceLike ) {
83+ maxLOSDistance = 25f ;
84+ moveSpeed = 10 ;
85+ shotDelay = 2 ;
86+ } else {
87+ maxLOSDistance = 15 ;
88+ moveSpeed = 0 ;
89+ shotDelay = 3 ;
90+ }
7791 }
7892
7993 void TrackShooting ( ) {
You can’t perform that action at this time.
0 commit comments