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);
|
||||
|
@ -11,6 +11,7 @@ public class CowardEnemyHoverMovement : 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;
|
||||
@ -47,7 +48,7 @@ public class CowardEnemyHoverMovement : HoverMovement
|
||||
private float _heightChangeTick;
|
||||
public float heightChangeInterval;
|
||||
|
||||
public override void DoAwakeTasks()
|
||||
protected override void DoAwakeTasks()
|
||||
{
|
||||
base.DoAwakeTasks();
|
||||
}
|
||||
@ -58,6 +59,7 @@ public class CowardEnemyHoverMovement : 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;
|
||||
@ -78,7 +80,7 @@ public class CowardEnemyHoverMovement : HoverMovement
|
||||
// Custom start stuff can go here
|
||||
}
|
||||
|
||||
void DoAIPhysics(float currentTimeStep)
|
||||
private void DoAIPhysics(float currentTimeStep)
|
||||
{
|
||||
|
||||
}
|
||||
@ -87,8 +89,17 @@ public class CowardEnemyHoverMovement : HoverMovement
|
||||
/// Calculates some RNG movement for the attached Enemy.
|
||||
/// </summary>
|
||||
/// <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)
|
||||
private 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;
|
||||
|
||||
@ -180,7 +191,7 @@ public class CowardEnemyHoverMovement : 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)
|
||||
@ -280,7 +291,7 @@ public class CowardEnemyHoverMovement : 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)
|
||||
@ -300,7 +311,7 @@ public class CowardEnemyHoverMovement : HoverMovement
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessCooldowns(float currentTimeStep)
|
||||
private void ProcessCooldowns(float currentTimeStep)
|
||||
{
|
||||
if (_emergencyBoosting)
|
||||
{
|
||||
@ -372,6 +383,7 @@ public class CowardEnemyHoverMovement : HoverMovement
|
||||
{
|
||||
if (objectIsActive)
|
||||
{
|
||||
ProcessWorkingStartValues(Time.deltaTime);
|
||||
DoAI(Time.deltaTime);
|
||||
ProcessPreMovement(Time.deltaTime);
|
||||
ProcessCurrentMovement(Time.deltaTime);
|
||||
|
@ -7,6 +7,7 @@ public class DropperEnemyHoverMovement : 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;
|
||||
@ -34,19 +35,18 @@ public class DropperEnemyHoverMovement : HoverMovement
|
||||
public float dropCooldownSpeed;
|
||||
private bool _dropped;
|
||||
private float _currentDropCooldownTick;
|
||||
|
||||
|
||||
public override void DoAwakeTasks()
|
||||
protected override void DoAwakeTasks()
|
||||
{
|
||||
base.DoAwakeTasks();
|
||||
}
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
private void Start()
|
||||
{
|
||||
// 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;
|
||||
@ -64,7 +64,7 @@ public class DropperEnemyHoverMovement : HoverMovement
|
||||
// Custom start stuff can go here
|
||||
}
|
||||
|
||||
void DoAIPhysics(float currentTimeStep)
|
||||
private void DoAIPhysics(float currentTimeStep)
|
||||
{
|
||||
RaycastHit belowCheck;
|
||||
Physics.SphereCast(transform.position, 5.0f, -transform.up, out belowCheck, 6.0f, LayerMask.GetMask("Player"));
|
||||
@ -87,8 +87,17 @@ public class DropperEnemyHoverMovement : HoverMovement
|
||||
/// Calculates some RNG movement for the attached Enemy.
|
||||
/// </summary>
|
||||
/// <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)
|
||||
private 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;
|
||||
Vector3 playerLocation = Vector3.ProjectOnPlane(_player.transform.position, Vector3.forward);
|
||||
@ -151,7 +160,7 @@ public class DropperEnemyHoverMovement : 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)
|
||||
@ -243,7 +252,7 @@ public class DropperEnemyHoverMovement : 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)
|
||||
@ -263,7 +272,7 @@ public class DropperEnemyHoverMovement : HoverMovement
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessCooldowns(float currentTimeStep)
|
||||
private void ProcessCooldowns(float currentTimeStep)
|
||||
{
|
||||
if (_dropped)
|
||||
{
|
||||
@ -298,6 +307,7 @@ public class DropperEnemyHoverMovement : HoverMovement
|
||||
{
|
||||
if (objectIsActive)
|
||||
{
|
||||
ProcessWorkingStartValues(Time.deltaTime);
|
||||
DoAI(Time.deltaTime);
|
||||
ProcessPreMovement(Time.deltaTime);
|
||||
ProcessCurrentMovement(Time.deltaTime);
|
||||
|
@ -7,6 +7,7 @@ public class DumbEnemyHoverMovement : 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;
|
||||
@ -38,17 +39,18 @@ public class DumbEnemyHoverMovement : HoverMovement
|
||||
private float _heightChangeTick;
|
||||
public float heightChangeInterval;
|
||||
|
||||
public override void DoAwakeTasks()
|
||||
protected override void DoAwakeTasks()
|
||||
{
|
||||
base.DoAwakeTasks();
|
||||
}
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
private void Start()
|
||||
{
|
||||
// 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;
|
||||
@ -66,7 +68,7 @@ public class DumbEnemyHoverMovement : HoverMovement
|
||||
// Custom start stuff can go here
|
||||
}
|
||||
|
||||
void DoAIPhysics(float currentTimeStep)
|
||||
private void DoAIPhysics(float currentTimeStep)
|
||||
{
|
||||
|
||||
}
|
||||
@ -75,8 +77,17 @@ public class DumbEnemyHoverMovement : HoverMovement
|
||||
/// Calculates some RNG movement for the attached Enemy.
|
||||
/// </summary>
|
||||
/// <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)
|
||||
private 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;
|
||||
Vector3 playerLocation = Vector3.ProjectOnPlane(_player.transform.position, Vector3.up);
|
||||
@ -150,7 +161,7 @@ public class DumbEnemyHoverMovement : 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)
|
||||
@ -242,7 +253,7 @@ public class DumbEnemyHoverMovement : 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)
|
||||
@ -262,7 +273,7 @@ public class DumbEnemyHoverMovement : HoverMovement
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessCooldowns(float currentTimeStep)
|
||||
private void ProcessCooldowns(float currentTimeStep)
|
||||
{
|
||||
if (_heightChangeTick >= heightChangeInterval)
|
||||
{
|
||||
@ -294,6 +305,7 @@ public class DumbEnemyHoverMovement : HoverMovement
|
||||
{
|
||||
if (objectIsActive)
|
||||
{
|
||||
ProcessWorkingStartValues(Time.deltaTime);
|
||||
DoAI(Time.deltaTime);
|
||||
ProcessPreMovement(Time.deltaTime);
|
||||
ProcessCurrentMovement(Time.deltaTime);
|
||||
|
Reference in New Issue
Block a user