Added new sounds needed for game
Added blackhole swirl texture and materials Added Magnet, Hunter and Drop core powerups and script overhaul for powerups in general Added Scenes and Cinematic changes for the game, win and death screens Added a score Changed the way enemy spawns work Removed unused scripts
This commit is contained in:
@ -5,6 +5,7 @@ public class ChaserEnemyHoverMovement : HoverMovement
|
||||
// Game object to track the player GO
|
||||
private GameObject _player;
|
||||
private GameObject _blackHole;
|
||||
private EnemyColliderManager _enemyColliderManager;
|
||||
|
||||
// Residual Thrust variables to handle the "glide" after the gameObject has moved
|
||||
public float residualThrustStep;
|
||||
@ -33,9 +34,8 @@ public class ChaserEnemyHoverMovement : HoverMovement
|
||||
private bool _charged;
|
||||
private float _currentChargeCooldownTick;
|
||||
|
||||
|
||||
public override void DoAwakeTasks()
|
||||
{
|
||||
protected override void DoAwakeTasks()
|
||||
{
|
||||
base.DoAwakeTasks();
|
||||
}
|
||||
|
||||
@ -45,6 +45,7 @@ public class ChaserEnemyHoverMovement : HoverMovement
|
||||
// We have to find the player since setting it in the editor doesnt work correctly
|
||||
_player = GameObject.Find("Player");
|
||||
_blackHole = GameObject.Find("BlackHole");
|
||||
_enemyColliderManager = gameObject.GetComponent<EnemyColliderManager>();
|
||||
|
||||
_residualThrust = 0.0f;
|
||||
_residualThrustCurrentTime = 0.0f;
|
||||
@ -87,6 +88,15 @@ public class ChaserEnemyHoverMovement : HoverMovement
|
||||
/// <param name="currentTimeStep">The time unit currently used, typically deltatime or deltafixed time depending on if its the fixed update or not.</param>
|
||||
void DoAI(float currentTimeStep)
|
||||
{
|
||||
if (_enemyColliderManager.Magnetized)
|
||||
{
|
||||
_noMovement = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
_noMovement = false;
|
||||
}
|
||||
|
||||
// Get the Up vector of each gameObject so we can compare its X values rather than the Y
|
||||
Vector3 playerDirection = _player.transform.position - transform.position;
|
||||
|
||||
@ -163,7 +173,7 @@ public class ChaserEnemyHoverMovement : HoverMovement
|
||||
/// Anything in this method can be removed, as long as the _turnDirection and _thrustDirection are set then the parent script with handle the orbit and positioning.
|
||||
/// </summary>
|
||||
/// <param name="currentTimeStep">The time unit currently used, typically deltatime or deltafixed time depending on if its the fixed update or not.</param>
|
||||
public override void ProcessPreMovement(float currentTimeStep)
|
||||
protected override void ProcessPreMovement(float currentTimeStep)
|
||||
{
|
||||
// Check if movement has been frozen
|
||||
if (!freezeMovement)
|
||||
@ -255,7 +265,7 @@ public class ChaserEnemyHoverMovement : HoverMovement
|
||||
/// <summary>
|
||||
/// Method for dealing with the jump physics, this should be in the fixed update since it uses rigidbody physics
|
||||
/// </summary>
|
||||
void ProcessJump()
|
||||
private void ProcessJump()
|
||||
{
|
||||
// If the enemy is jumping add the jump force
|
||||
if (_isJumping)
|
||||
@ -275,7 +285,7 @@ public class ChaserEnemyHoverMovement : HoverMovement
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessCooldowns(float currentTimeStep)
|
||||
private void ProcessCooldowns(float currentTimeStep)
|
||||
{
|
||||
if (_charged)
|
||||
{
|
||||
@ -310,6 +320,7 @@ public class ChaserEnemyHoverMovement : HoverMovement
|
||||
{
|
||||
if (objectIsActive)
|
||||
{
|
||||
ProcessWorkingStartValues(Time.deltaTime);
|
||||
DoAI(Time.deltaTime);
|
||||
ProcessPreMovement(Time.deltaTime);
|
||||
ProcessCurrentMovement(Time.deltaTime);
|
||||
|
Reference in New Issue
Block a user