Skip to content

Commit

Permalink
#29: Fixed Death Particle issue
Browse files Browse the repository at this point in the history
Changed the speed of the death particle. Also, made a few minor tweaks.
  • Loading branch information
Alriightyman committed Dec 27, 2019
1 parent a413278 commit aae08f0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 21 deletions.
22 changes: 10 additions & 12 deletions MegaEngine/Assets/Scripts/Player/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class Player : MonoBehaviour

// Unity Editor Variables
[SerializeField] protected Rigidbody2D deathParticlePrefab;
[SerializeField] protected Transform playerTexObj;
[SerializeField] private float deathParticleSpeed = 75f;

// Public Properties
public bool IsPlayerInactive { get; set; }
Expand Down Expand Up @@ -223,18 +223,16 @@ protected void CreateDeathParticle(float speed, Vector3 pos, Vector3 vel)
//
protected IEnumerator CreateDeathParticles(Vector3 pos)
{
float deathParticleSpeed = 6.0f / 6;

// Before the wait...
Vector3 p1 = pos + Vector3.up / 6;
Vector3 p2 = pos - Vector3.up / 6;
Vector3 p3 = pos + Vector3.right / 6;
Vector3 p4 = pos - Vector3.right / 6;

Vector3 p5 = pos + Vector3.up/6 + Vector3.right / 6;
Vector3 p6 = pos + Vector3.up/6 - Vector3.right / 6;
Vector3 p7 = pos - Vector3.up/6 - Vector3.right / 6;
Vector3 p8 = pos - Vector3.up/6 + Vector3.right / 6;
Vector3 p1 = pos + Vector3.up;
Vector3 p2 = pos - Vector3.up;
Vector3 p3 = pos + Vector3.right;
Vector3 p4 = pos - Vector3.right ;

Vector3 p5 = pos + Vector3.up + Vector3.right ;
Vector3 p6 = pos + Vector3.up - Vector3.right ;
Vector3 p7 = pos - Vector3.up - Vector3.right ;
Vector3 p8 = pos - Vector3.up + Vector3.right ;


this.CreateDeathParticle(deathParticleSpeed, p1, (transform.up));
Expand Down
8 changes: 0 additions & 8 deletions MegaEngine/Assets/Sprites/Common.meta

This file was deleted.

2 changes: 1 addition & 1 deletion MegaEngine/Assets/StreamingAssets/build_info
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Build from FTR8F72 at 12/27/2019 5:58:14 PM
Build from FTR8F72 at 12/27/2019 6:36:09 PM

0 comments on commit aae08f0

Please sign in to comment.