Pull request #40: Louis

Merge in CEGJ/creative-jam-20 from Louis to main

* commit '7e7b3a45a0226f62f7989d720184846d2f921128':
  fixed post merge
  particles on hit planet
  hit feedback particles
This commit is contained in:
Louis Horlaville 2022-05-15 20:51:28 +00:00
commit 85e40c173a
11 changed files with 8498 additions and 9 deletions

BIN
Assets/Art/cursor.png.meta (Stored with Git LFS)

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2530bb7d1c409324a8cbcd29b6ec106a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -549,6 +549,7 @@ Transform:
m_Children:
- {fileID: 9175352504942883267}
- {fileID: 378992053168571211}
- {fileID: 8607896124484432511}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -566,6 +567,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
explosion: {fileID: 6113853661072388009}
explosionDebris: {fileID: 6704497973935827627}
onHitExplosion: {fileID: 6699315643444341781}
landingPoint: {fileID: 0}
body: {fileID: 4916962407531476031}
sfx: {fileID: 1468877991388605754}
@ -1064,6 +1066,73 @@ MonoBehaviour:
m_ShadowLayerMask: 1
m_LightCookieSize: {x: 1, y: 1}
m_LightCookieOffset: {x: 0, y: 0}
--- !u!1001 &2390518803519823551
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 4834061106301780288}
m_Modifications:
- target: {fileID: 138504292592014834, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_Name
value: OnHit
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -90
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
--- !u!198 &6699315643444341781 stripped
ParticleSystem:
m_CorrespondingSourceObject: {fileID: 9066894193389433514, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
m_PrefabInstance: {fileID: 2390518803519823551}
m_PrefabAsset: {fileID: 0}
--- !u!4 &8607896124484432511 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
m_PrefabInstance: {fileID: 2390518803519823551}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &2957969651565829379
PrefabInstance:
m_ObjectHideFlags: 0

View File

@ -216,6 +216,7 @@ Transform:
- {fileID: 946786364870826004}
- {fileID: 8720344212724865050}
- {fileID: 4075441662892148295}
- {fileID: 2720303500880571998}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -265,6 +266,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
explosion: {fileID: 1370012825294936109}
explosionDebris: {fileID: 1932237231617645871}
onHitExplosion: {fileID: 1030715603680260148}
landingPoint: {fileID: 0}
body: {fileID: 6601239271941144557}
sfx: {fileID: 5825531694307741412}
@ -11050,3 +11052,70 @@ Transform:
m_CorrespondingSourceObject: {fileID: 6222206415246453952, guid: 0a208950d4f32da48b5b03e103af591b, type: 3}
m_PrefabInstance: {fileID: 7986948521383717511}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &8329902684326265502
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1002961339065835566}
m_Modifications:
- target: {fileID: 138504292592014834, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_Name
value: OnHit
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -90
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
--- !u!198 &1030715603680260148 stripped
ParticleSystem:
m_CorrespondingSourceObject: {fileID: 9066894193389433514, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
m_PrefabInstance: {fileID: 8329902684326265502}
m_PrefabAsset: {fileID: 0}
--- !u!4 &2720303500880571998 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
m_PrefabInstance: {fileID: 8329902684326265502}
m_PrefabAsset: {fileID: 0}

View File

@ -11009,6 +11009,7 @@ Transform:
- {fileID: 7257571198887076411}
- {fileID: 1197774401241834037}
- {fileID: 5842676399169191016}
- {fileID: 2282826750318303317}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -11058,15 +11059,15 @@ MonoBehaviour:
m_EditorClassIdentifier:
explosion: {fileID: 8834084193154966018}
explosionDebris: {fileID: 8307756088670856960}
onHitExplosion: {fileID: 3757014927451604543}
landingPoint: {fileID: 0}
body: {fileID: 3605108994955462082}
sfx: {fileID: 4792721917038421177}
enemyCrash: {fileID: 8300000, guid: fc62f6c0ccafc4b43a763c29137d625c, type: 3}
enemyDeath: {fileID: 8300000, guid: 7885d0ee8f43974478abb2ba43278cb6, type: 3}
enemyHit: {fileID: 8300000, guid: cf82b8589f9dc1c45997a8be4a762e0a, type: 3}
flyingSpeed: 10
collider: {fileID: 8097907429543341359}
maxHP: 1
maxHP: 3
damage: 1
--- !u!135 &8097907429543341359
SphereCollider:
@ -11690,3 +11691,82 @@ ParticleSystem:
m_CorrespondingSourceObject: {fileID: 9066894193389433514, guid: 0a208950d4f32da48b5b03e103af591b, type: 3}
m_PrefabInstance: {fileID: 526055833065377960}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &5329883789169570965
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 7237433744057047553}
m_Modifications:
- target: {fileID: 138504292592014834, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_Name
value: OnHit
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalScale.x
value: 2
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalScale.y
value: 2
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalScale.z
value: 2
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -90
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
--- !u!4 &2282826750318303317 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6222206415246453952, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
m_PrefabInstance: {fileID: 5329883789169570965}
m_PrefabAsset: {fileID: 0}
--- !u!198 &3757014927451604543 stripped
ParticleSystem:
m_CorrespondingSourceObject: {fileID: 9066894193389433514, guid: 2530bb7d1c409324a8cbcd29b6ec106a, type: 3}
m_PrefabInstance: {fileID: 5329883789169570965}
m_PrefabAsset: {fileID: 0}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ddbb88e84c9bf0246833fdf1636abeb8
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -31,7 +31,6 @@ public class CannonScript : MonoBehaviour
void Update()
{
Debug.DrawRay(transform.position, lookDir * Mathf.Infinity, Color.red);
Debug.Log(EventSystem.current.IsPointerOverGameObject());
if (firing && !EventSystem.current.IsPointerOverGameObject()){
fireTimer += Time.deltaTime;

View File

@ -15,6 +15,7 @@ public class DimensionController : MonoBehaviour
private void OnTriggerEnter(Collider other)
{
StartCoroutine(other.GetComponent<Enemy>().InstantDestroy());
if (_hp <= 0) { return; }
var enemy = other.GetComponent<Enemy>();
@ -22,9 +23,6 @@ public class DimensionController : MonoBehaviour
// Update HP (temp for now)
_hp -= enemy.DamageDealt();
// Destroy projectile
Destroy(other.gameObject);
GameManager.Instance.DealDamage(dimensionId, _hp, _maxHp);
}

View File

@ -5,6 +5,7 @@ public class Enemy : MonoBehaviour
{
public ParticleSystem explosion;
public ParticleSystem explosionDebris;
public ParticleSystem onHitExplosion;
public Transform landingPoint;
public GameObject body;
@ -53,6 +54,7 @@ public class Enemy : MonoBehaviour
}
else
{
StartCoroutine(playDmgParticles(destroyDelay));
SoundManager.Instance.PlaySfx(sfx, enemyHit);
}
}
@ -71,6 +73,24 @@ public class Enemy : MonoBehaviour
Destroy(gameObject);
}
public IEnumerator InstantDestroy()
{
gameObject.GetComponent<Rigidbody>().velocity = gameObject.transform.forward * (flyingSpeed / 3);
body.SetActive(false);
explosion.Emit(100);
explosionDebris.Emit(40);
yield return new WaitForSeconds(.1f);
collider.enabled = false;
yield return new WaitForSeconds(1f);
Destroy(gameObject);
}
IEnumerator playDmgParticles(float waitTime)
{
yield return new WaitForSeconds(waitTime);
onHitExplosion.Emit(100);
}
public float DamageDealt()
{
return damage;