Added Bind animation & Fixed scaling animation anchor functionality

This commit is contained in:
JappaWakka 2022-01-07 14:25:57 +01:00
parent fccb4ef5b5
commit e892977d70
5 changed files with 17 additions and 5 deletions

View File

@ -79,22 +79,22 @@
'Bottom
If Anchors.Contains("1") = True Then
Dim diffY As Single = saveScale.Y - TargetEntity.Scale.Y
Me.Position.Y -= diffY / 2
TargetEntity.Position.Y -= diffY / 2
End If
'Top
If Anchors.Contains("2") = True Then
Dim diffY As Single = saveScale.Y - TargetEntity.Scale.Y
Me.Position.Y += diffY / 2
TargetEntity.Position.Y += diffY / 2
End If
'Left
If Anchors.Contains("3") = True Then
Dim diffX As Single = saveScale.X - TargetEntity.Scale.X
Me.Position.X -= diffX / 2
TargetEntity.Position.X -= diffX / 2
End If
'Right
If Anchors.Contains("4") = True Then
Dim diffX As Single = saveScale.X - TargetEntity.Scale.X
Me.Position.X += diffX / 2
TargetEntity.Position.X += diffX / 2
End If
If Me.EndSize = TargetEntity.Scale Then

View File

@ -220,7 +220,7 @@
End If
End Sub
Public Sub AnimationScale(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal Grow As Boolean, ByVal EndSizeX As Single, ByVal EndSizeY As Single, ByVal EndSizeZ As Single, ByVal SizeSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal Anchors As String = "1")
Public Sub AnimationScale(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal Grow As Boolean, ByVal EndSizeX As Single, ByVal EndSizeY As Single, ByVal EndSizeZ As Single, ByVal SizeSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal Anchors As String = "")
Dim ScaleEntity As Entity
Dim ScaleModel As Entity = Nothing
If Entity Is Nothing Then

Binary file not shown.

View File

@ -14683,6 +14683,9 @@
<Content Include="Content\Sounds\Battle\Attacks\Grass\Absorb.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Sounds\Battle\Attacks\Normal\Bind.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Sounds\Battle\Attacks\Normal\Pound.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

View File

@ -87,6 +87,15 @@ Namespace BattleSystem.Moves.Normal
End If
End Sub
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
MoveAnimation.AnimationPlaySound("Battle\Attacks\Normal\Bind", 0.0F, 0)
MoveAnimation.AnimationScale(Nothing, False, False, 0.75F, 1.0F, 0.75F, 0.02F, 0, 0)
MoveAnimation.AnimationScale(Nothing, False, True, 1.0F, 1.0F, 1.0F, 0.04F, 2, 0)
MoveAnimation.AnimationScale(Nothing, False, False, 1.0F, 0.75F, 1.0F, 0.02F, 4, 0, "1")
MoveAnimation.AnimationScale(Nothing, False, True, 1.0F, 1.0F, 1.0F, 0.04F, 6, 1, "1")
BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub
End Class
End Namespace