From 58d5e1522349d18e6d4806b21dd312f879d5c2a6 Mon Sep 17 00:00:00 2001 From: gameegg Date: Mon, 23 Jan 2017 11:34:36 +0900 Subject: [PATCH 1/2] laser bug fix --- Assets/Prefabs/Game/ShipRenderer.prefab | 10 +++++----- Assets/Scripts/Game/ShipRenderer.cs | 18 +++++++++++++----- Assets/Scripts/Game/ShipUpdator.cs | 2 +- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/Assets/Prefabs/Game/ShipRenderer.prefab b/Assets/Prefabs/Game/ShipRenderer.prefab index 13dfaab..85a1c40 100644 --- a/Assets/Prefabs/Game/ShipRenderer.prefab +++ b/Assets/Prefabs/Game/ShipRenderer.prefab @@ -347,7 +347,7 @@ Transform: m_GameObject: {fileID: 1298466188941236} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 7.7, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalScale: {x: 10, y: 10, z: 10} m_Children: [] m_Father: {fileID: 4456669334348854} m_RootOrder: 4 @@ -6660,8 +6660,8 @@ ParticleSystem: minMaxState: 0 moveWithTransform: 1 moveWithCustomTransform: {fileID: 0} - scalingMode: 1 - randomSeed: 2135685641 + scalingMode: 0 + randomSeed: -2146223951 InitialModule: serializedVersion: 3 enabled: 1 @@ -14509,8 +14509,8 @@ ParticleSystemRenderer: m_MinParticleSize: 0 m_MaxParticleSize: 0.5 m_CameraVelocityScale: 0 - m_VelocityScale: 0.05 - m_LengthScale: 0 + m_VelocityScale: 0 + m_LengthScale: 3.6 m_SortingFudge: 0 m_NormalDirection: 1 m_RenderAlignment: 0 diff --git a/Assets/Scripts/Game/ShipRenderer.cs b/Assets/Scripts/Game/ShipRenderer.cs index 06ba9b2..bd043fc 100644 --- a/Assets/Scripts/Game/ShipRenderer.cs +++ b/Assets/Scripts/Game/ShipRenderer.cs @@ -113,8 +113,14 @@ void Alive(bool alive) } } - void Shooted(Vector2 pos) + void Shooted(Vector2 pos){ + StartCoroutine(Shooted2(pos)); + } + + IEnumerator Shooted2(Vector2 pos) { + yield return null; + foreach (var p in chargingParticles) { p.gameObject.SetActive(false); @@ -127,14 +133,16 @@ void Shooted(Vector2 pos) var rad = _ship.shootingRad; var direction = new Vector3(Mathf.Cos(rad), Mathf.Sin(rad),0); - laser.Show(transform.position + direction * 2, pos, _ship.shootingPower); - + laser.Show(transform.position + direction * 30, pos, _ship.shootingPower); + yield return null; + yield return null; + /* foreach (var p in laserHitParticles) { - p.transform.position = new Vector3(pos.x,pos.y,0) - direction*2; + p.transform.position = new Vector3(pos.x,pos.y,0) - direction*18; p.Play(); - } + }*/ } void IsCharging(bool value) diff --git a/Assets/Scripts/Game/ShipUpdator.cs b/Assets/Scripts/Game/ShipUpdator.cs index 38e339a..0957366 100644 --- a/Assets/Scripts/Game/ShipUpdator.cs +++ b/Assets/Scripts/Game/ShipUpdator.cs @@ -33,9 +33,9 @@ public override void GameUpdate() { if (_ship.alive.value) { - UpdateShooting(); UpdateRotation(); UpdatePosition(); + UpdateShooting(); CheckDead(); } else From 02d062cf0586504011042383b02229ec43fea5bd Mon Sep 17 00:00:00 2001 From: gameegg Date: Mon, 23 Jan 2017 11:39:25 +0900 Subject: [PATCH 2/2] double -> float --- Assets/Scripts/ResultUI/CardManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/ResultUI/CardManager.cs b/Assets/Scripts/ResultUI/CardManager.cs index f8b6445..82ae6eb 100644 --- a/Assets/Scripts/ResultUI/CardManager.cs +++ b/Assets/Scripts/ResultUI/CardManager.cs @@ -333,7 +333,7 @@ public static void InitAllCards() goodFontColor, goodColor, new List()); - card.conditions.Add(new CardCondition_TotalUseEnerge(0.1, false)); + card.conditions.Add(new CardCondition_TotalUseEnerge(0.1f, false)); cardList.Add(card); } }