Browse Source

Artillery Effect Fix

bolt_update
laurids 3 years ago
parent
commit
388a8ae720
4 changed files with 23 additions and 15 deletions
  1. +2
    -2
      Assets/GWConquest/Prefabs/UI/BattleArmyGui.prefab
  2. +10
    -5
      Assets/GWConquest/Scenes/GalaxyMap.unity
  3. +8
    -5
      Assets/GWConquest/Scripts/UI/BattleUnitIcon.cs
  4. +3
    -3
      Assets/GWConquest/Scripts/Unit.cs

+ 2
- 2
Assets/GWConquest/Prefabs/UI/BattleArmyGui.prefab View File

@ -610,8 +610,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1} m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -90, y: -90}
m_SizeDelta: {x: 200, y: 200}
m_AnchoredPosition: {x: -60, y: -60}
m_SizeDelta: {x: 120, y: 120}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2200581606992659820 --- !u!222 &2200581606992659820
CanvasRenderer: CanvasRenderer:


+ 10
- 5
Assets/GWConquest/Scenes/GalaxyMap.unity View File

@ -28073,7 +28073,7 @@ MonoBehaviour:
MoveToFlankCooldown: 15 MoveToFlankCooldown: 15
MoveToReserveCooldown: 15 MoveToReserveCooldown: 15
UnitDeathCooldown: 60 UnitDeathCooldown: 60
ArtilleryCooldown: 1
ArtilleryCooldown: 20
MovementStartingCooldown: 10 MovementStartingCooldown: 10
MovementFinishedCooldown: 10 MovementFinishedCooldown: 10
DefaultStorageCapacity: 10000 DefaultStorageCapacity: 10000
@ -50981,8 +50981,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -8.91626}
m_SizeDelta: {x: -20, y: 40}
m_AnchoredPosition: {x: 0, y: 6}
m_SizeDelta: {x: -29.999992, y: 33.233643}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!222 &824125517 --- !u!222 &824125517
CanvasRenderer: CanvasRenderer:
@ -52579,7 +52579,7 @@ PrefabInstance:
- target: {fileID: 7870129596896663125, guid: 8b0edf9c7ac699a4da4b06f9b352ff47, - target: {fileID: 7870129596896663125, guid: 8b0edf9c7ac699a4da4b06f9b352ff47,
type: 3} type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: -7.09
value: -7.090027
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7870129596896663125, guid: 8b0edf9c7ac699a4da4b06f9b352ff47, - target: {fileID: 7870129596896663125, guid: 8b0edf9c7ac699a4da4b06f9b352ff47,
type: 3} type: 3}
@ -79171,6 +79171,11 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: TitlePanel value: TitlePanel
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3709556431398436641, guid: 8b0edf9c7ac699a4da4b06f9b352ff47,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7870129596896663125, guid: 8b0edf9c7ac699a4da4b06f9b352ff47, - target: {fileID: 7870129596896663125, guid: 8b0edf9c7ac699a4da4b06f9b352ff47,
type: 3} type: 3}
propertyPath: m_Pivot.x propertyPath: m_Pivot.x
@ -114827,7 +114832,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 200, y: -52.83618}
m_AnchoredPosition: {x: 200, y: -33}
m_SizeDelta: {x: -400, y: 27.159664} m_SizeDelta: {x: -400, y: 27.159664}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!114 &1829904045 --- !u!114 &1829904045


+ 8
- 5
Assets/GWConquest/Scripts/UI/BattleUnitIcon.cs View File

@ -209,11 +209,13 @@ namespace GWConquest {
} }
public void PlayHitAnim()
public void PlayHitAnim(UnitDamageAnimEvent evnt)
{ {
if(IsAnimatorIdle) if(IsAnimatorIdle)
{ {
if(Unit.Class.UnitType == UnitType.Infantry)
bool explode = (evnt.Attacker != null && evnt.Attacker.GetComponent<Unit>().Class.UnitType == UnitType.Artillery)
|| Unit.Class.UnitType != UnitType.Infantry;
if(!explode)
{ {
GetComponent<Animator>().SetTrigger("Hit"); GetComponent<Animator>().SetTrigger("Hit");
SoundEffects.Instance.PlayEffect("Hit"); SoundEffects.Instance.PlayEffect("Hit");
@ -233,10 +235,11 @@ namespace GWConquest {
SoundEffects.Instance.PlayEffect("Death"); SoundEffects.Instance.PlayEffect("Death");
} }
public void PlayDeathAnim()
public void PlayDeathAnim(UnitDamageAnimEvent evnt)
{ {
bool explosion = Unit.Class.UnitType != UnitType.Infantry;
StartCoroutine(DeathAnimCoroutine(explosion));
bool explode = (evnt.Attacker != null && evnt.Attacker.GetComponent<Unit>().Class.UnitType == UnitType.Artillery)
|| Unit.Class.UnitType != UnitType.Infantry;
StartCoroutine(DeathAnimCoroutine(explode));
} }
public void PlayAttackingAnim() public void PlayAttackingAnim()


+ 3
- 3
Assets/GWConquest/Scripts/Unit.cs View File

@ -263,7 +263,7 @@ namespace GWConquest
{ {
if(evnt.IsDead) if(evnt.IsDead)
{ {
CurrentIcon.PlayDeathAnim();
CurrentIcon.PlayDeathAnim(evnt);
} }
else if(evnt.IsDemoralized && !DemoralizedAnimPlayed) else if(evnt.IsDemoralized && !DemoralizedAnimPlayed)
{ {
@ -275,7 +275,7 @@ namespace GWConquest
CurrentIcon.PlayGlancingHitAnim(); CurrentIcon.PlayGlancingHitAnim();
} }
else { else {
CurrentIcon.PlayHitAnim();
CurrentIcon.PlayHitAnim(evnt);
} }
@ -286,7 +286,7 @@ namespace GWConquest
if(attacker.Class.UnitType == UnitType.Artillery) if(attacker.Class.UnitType == UnitType.Artillery)
{ {
SoundEffects.Instance.PlayEffect("Artillery");
SoundEffects.Instance.PlayEffect("ArtilleryShot");
} }
else { else {
WeaponType weaponType = (WeaponType) evnt.WeaponType; WeaponType weaponType = (WeaponType) evnt.WeaponType;


Loading…
Cancel
Save