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:
@ -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