SFX & Battle Animations

Ported Battle Animation Code
Ported Battle Animations for Tackle, Pound, Growl, Ember and Poison Sting
Normalized all SFX by Perceived Loudness (-11.0 LUFS)
Renamed and moved a bunch of the SFX so they make more sense
Added a jingle when you register a Phone Number
Added a soundeffect for when an elevator reaches its destination
This commit is contained in:
JappaWakkaP3D 2021-08-22 16:10:06 +02:00
parent 7c22837f50
commit 9723820427
208 changed files with 1832 additions and 841 deletions

View File

@ -0,0 +1,191 @@
Public Class BABillMove
Inherits BattleAnimation3D
Public TargetEntity As Entity
Public Destination As Vector3
Public MoveSpeed As Single
Public InterpolationSpeed As Single
Public SpinX As Boolean = False
Public SpinZ As Boolean = False
Public SpinSpeedX As Single = 0.1F
Public SpinSpeedZ As Single = 0.1F
Public MovementCurve As Integer = 3
Private EasedIn As Boolean = False
Private EasedOut As Boolean = False
Public Enum Curves As Integer
EaseIn
EaseOut
EaseInAndOut
NoEase
Linear
End Enum
Public Sub New(ByRef entity As Entity, ByVal Destination As Vector3, ByVal Speed As Single, ByVal SpinX As Boolean, ByVal SpinZ As Boolean, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal SpinXSpeed As Single = 0.1F, Optional ByVal SpinZSpeed As Single = 0.1F, Optional MovementCurve As Integer = 3)
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
Me.Destination = Destination
Me.MoveSpeed = Speed
Me.MovementCurve = CType(MovementCurve, Curves)
Me.SpinX = SpinX
Me.SpinZ = SpinZ
Me.SpinSpeedX = SpinXSpeed
Me.SpinSpeedZ = SpinZSpeed
Me.Visible = False
Me.TargetEntity = entity
Select Case MovementCurve
Case Curves.EaseIn
InterpolationSpeed = 0.0F
Case Curves.EaseOut
InterpolationSpeed = MoveSpeed
Case Curves.EaseInAndOut
InterpolationSpeed = 0.0F
Case Curves.NoEase
InterpolationSpeed = MoveSpeed
End Select
Me.AnimationType = AnimationTypes.Move
End Sub
Public Overrides Sub DoActionUpdate()
Spin()
End Sub
Public Overrides Sub DoActionActive()
Move()
End Sub
Private Sub Spin()
If Me.SpinX = True Then
Dim targetEntity = Me.TargetEntity
targetEntity.Rotation.X += SpinSpeedX
End If
If Me.SpinZ = True Then
TargetEntity.Rotation.Z += SpinSpeedZ
End If
End Sub
Private Sub Move()
Select Case MovementCurve
Case Curves.EaseIn
If EasedIn = False Then
If InterpolationSpeed < MoveSpeed Then
InterpolationSpeed += MoveSpeed / 10
Else
EasedIn = True
InterpolationSpeed = MoveSpeed
End If
End If
Case Curves.EaseOut
If EasedOut = False Then
If InterpolationSpeed > 0 Then
InterpolationSpeed -= MoveSpeed / 10
Else
EasedOut = True
InterpolationSpeed = 0
End If
End If
Case Curves.EaseInAndOut
If EasedIn = False Then
If InterpolationSpeed < MoveSpeed Then
InterpolationSpeed += MoveSpeed / 10
Else
EasedIn = True
InterpolationSpeed = MoveSpeed
End If
Else
If EasedOut = False Then
If InterpolationSpeed > 0 Then
InterpolationSpeed -= MoveSpeed / 10
Else
EasedOut = True
InterpolationSpeed = 0
End If
End If
End If
End Select
If MovementCurve = Curves.Linear Then
If TargetEntity.Position.X < Me.Destination.X Then
TargetEntity.Position.X += Me.MoveSpeed
If TargetEntity.Position.X >= Me.Destination.X Then
TargetEntity.Position.X = Me.Destination.X
End If
ElseIf TargetEntity.Position.X > Me.Destination.X Then
TargetEntity.Position.X -= Me.MoveSpeed
If TargetEntity.Position.X <= Me.Destination.X Then
TargetEntity.Position.X = Me.Destination.X
End If
End If
If TargetEntity.Position.Y < Me.Destination.Y Then
TargetEntity.Position.Y += Me.MoveSpeed
If TargetEntity.Position.Y >= Me.Destination.Y Then
TargetEntity.Position.Y = Me.Destination.Y
End If
ElseIf TargetEntity.Position.Y > Me.Destination.Y Then
TargetEntity.Position.Y -= Me.MoveSpeed
If TargetEntity.Position.Y <= Me.Destination.Y Then
TargetEntity.Position.Y = Me.Destination.Y
End If
End If
If TargetEntity.Position.Z < Me.Destination.Z Then
TargetEntity.Position.Z += Me.MoveSpeed
If TargetEntity.Position.Z >= Me.Destination.Z Then
TargetEntity.Position.Z = Me.Destination.Z
End If
ElseIf TargetEntity.Position.Z > Me.Destination.Z Then
TargetEntity.Position.Z -= Me.MoveSpeed
If TargetEntity.Position.Z <= Me.Destination.Z Then
TargetEntity.Position.Z = Me.Destination.Z
End If
End If
Else
If TargetEntity.Position.X < Me.Destination.X Then
TargetEntity.Position.X = MathHelper.Lerp(TargetEntity.Position.X, Me.Destination.X, Me.InterpolationSpeed)
If TargetEntity.Position.X > Me.Destination.X - 0.05 Then
TargetEntity.Position.X = Me.Destination.X
End If
ElseIf TargetEntity.Position.X > Me.Destination.X Then
TargetEntity.Position.X = MathHelper.Lerp(TargetEntity.Position.X, Me.Destination.X, Me.InterpolationSpeed)
If TargetEntity.Position.X < Me.Destination.X + 0.05 Then
TargetEntity.Position.X = Me.Destination.X
End If
End If
If TargetEntity.Position.Y < Me.Destination.Y Then
TargetEntity.Position.Y = MathHelper.Lerp(TargetEntity.Position.Y, Me.Destination.Y, Me.InterpolationSpeed)
If TargetEntity.Position.Y > Me.Destination.Y - 0.05 Then
TargetEntity.Position.Y = Me.Destination.Y
End If
ElseIf TargetEntity.Position.Y > Me.Destination.Y Then
TargetEntity.Position.Y = MathHelper.Lerp(TargetEntity.Position.Y, Me.Destination.Y, Me.InterpolationSpeed)
If TargetEntity.Position.Y < Me.Destination.Y + 0.05 Then
TargetEntity.Position.Y = Me.Destination.Y
End If
End If
If TargetEntity.Position.Z < Me.Destination.Z Then
TargetEntity.Position.Z = MathHelper.Lerp(TargetEntity.Position.Z, Me.Destination.Z, Me.InterpolationSpeed)
If TargetEntity.Position.Z > Me.Destination.Z - 0.05 Then
TargetEntity.Position.Z = Me.Destination.Z
End If
ElseIf TargetEntity.Position.Z > Me.Destination.Z Then
TargetEntity.Position.Z = MathHelper.Lerp(TargetEntity.Position.Z, Me.Destination.Z, Me.InterpolationSpeed)
If TargetEntity.Position.Z < Me.Destination.Z + 0.05 Then
TargetEntity.Position.Z = Me.Destination.Z
End If
End If
End If
If TargetEntity.Position = Destination Then
Me.Ready = True
End If
End Sub
End Class

View File

@ -0,0 +1,45 @@
Public Class BABillOpacity
Inherits BattleAnimation3D
Public TargetEntity As Entity
Public TransitionSpeed As Single = 0.01F
Public FadeIn As Boolean = False
Public EndState As Single = 0.0F
Public Sub New(ByVal entity As Entity, ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal StartState As Single = 1.0F)
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
Me.EndState = EndState
Me.FadeIn = FadeIn
Me.TransitionSpeed = TransitionSpeed
Me.TargetEntity = entity
Me.TargetEntity.Opacity = StartState
Me.Visible = False
Me.AnimationType = AnimationTypes.Transition
End Sub
Public Overrides Sub DoActionActive()
If Me.FadeIn = True Then
If Me.EndState > TargetEntity.Opacity Then
TargetEntity.Opacity += Me.TransitionSpeed
If TargetEntity.Opacity >= Me.EndState Then
TargetEntity.Opacity = Me.EndState
End If
End If
Else
If Me.EndState < TargetEntity.Opacity Then
TargetEntity.Opacity -= Me.TransitionSpeed
If TargetEntity.Opacity <= Me.EndState Then
TargetEntity.Opacity = Me.EndState
End If
End If
End If
If TargetEntity.Opacity = Me.EndState Then
Me.Ready = True
End If
End Sub
End Class

View File

@ -0,0 +1,108 @@
Public Class BABillSize
Inherits BattleAnimation3D
Public Grow As Boolean = False
Public EndSize As Vector3
Public SizeSpeed As Single = 0.01F
Public TargetEntity As Entity
Public Anchors As String
Public Change As New Vector3(1)
Public Sub New(ByVal Entity As Entity, ByVal Scale As Vector3, ByVal Grow As Boolean, ByVal EndSize As Vector3, ByVal SizeSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single, ByVal Anchors As String)
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, Scale, startDelay, endDelay)
Me.Anchors = Anchors
Me.Grow = Grow
Me.EndSize = EndSize
Me.SizeSpeed = SizeSpeed
Me.TargetEntity = Entity
Me.AnimationType = AnimationTypes.Size
End Sub
Public Overrides Sub DoActionActive()
Dim saveScale As Vector3 = TargetEntity.Scale
Dim changeX As Single = SizeSpeed * Change.X
Dim changeY As Single = SizeSpeed * Change.Y
Dim changeZ As Single = SizeSpeed * Change.Z
If Grow = True Then
If TargetEntity.Scale.X < Me.EndSize.X Then
TargetEntity.Scale.X += changeX
If TargetEntity.Scale.X >= Me.EndSize.X Then
TargetEntity.Scale.X = Me.EndSize.X
End If
End If
If TargetEntity.Scale.Y < Me.EndSize.Y Then
TargetEntity.Scale.Y += changeY
If TargetEntity.Scale.Y >= Me.EndSize.Y Then
TargetEntity.Scale.Y = Me.EndSize.Y
End If
End If
If TargetEntity.Scale.Z < Me.EndSize.Z Then
TargetEntity.Scale.Z += changeZ
If TargetEntity.Scale.Z >= Me.EndSize.Z Then
TargetEntity.Scale.Z = Me.EndSize.Z
End If
End If
Else
If TargetEntity.Scale.X > Me.EndSize.X Then
TargetEntity.Scale.X -= changeX
If TargetEntity.Scale.X <= Me.EndSize.X Then
TargetEntity.Scale.X = Me.EndSize.X
End If
End If
If TargetEntity.Scale.Y > Me.EndSize.Y Then
TargetEntity.Scale.Y -= changeY
If TargetEntity.Scale.Y <= Me.EndSize.Y Then
TargetEntity.Scale.Y = Me.EndSize.Y
End If
End If
If TargetEntity.Scale.Z > Me.EndSize.Z Then
TargetEntity.Scale.Z -= changeZ
If TargetEntity.Scale.Z <= Me.EndSize.Z Then
TargetEntity.Scale.Z = Me.EndSize.Z
End If
End If
End If
'Bottom
If Anchors.Contains("1") = True Then
Dim diffY As Single = saveScale.Y - TargetEntity.Scale.Y
Me.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
End If
'Left
If Anchors.Contains("3") = True Then
Dim diffX As Single = saveScale.X - TargetEntity.Scale.X
Me.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
End If
If Me.EndSize = TargetEntity.Scale Then
Me.Ready = True
End If
End Sub
Public Sub SetChange(ByVal changeX As Single, ByVal changeY As Single, ByVal changeZ As Single)
Me.Change = New Vector3(changeX, changeY, changeZ)
End Sub
End Class

View File

@ -7,25 +7,52 @@
Public SpinX As Boolean = False
Public SpinZ As Boolean = False
Public InterpolationSpeed As Single
Public SpinSpeedX As Single = 0.1F
Public SpinSpeedZ As Single = 0.1F
Public MovementCurve As Integer = 2
Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal Destination As Vector3, ByVal Speed As Single, ByVal SpinX As Boolean, ByVal SpinZ As Boolean, ByVal startDelay As Single, ByVal endDelay As Single)
Private EasedIn As Boolean = False
Private EasedOut As Boolean = False
Public Enum Curves As Integer
EaseIn
EaseOut
EaseInAndOut
NoEase
Linear
End Enum
Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal Destination As Vector3, ByVal Speed As Single, ByVal SpinX As Boolean, ByVal SpinZ As Boolean, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal SpinXSpeed As Single = 0.1F, Optional ByVal SpinZSpeed As Single = 0.1F, Optional MovementCurve As Integer = 2)
MyBase.New(Position, Texture, Scale, startDelay, endDelay)
Me.Position = Position
Me.Destination = Destination
Me.MovementCurve = CType(MovementCurve, Curves)
Me.MoveSpeed = Speed
Me.Scale = Scale
Me.SpinSpeedX = SpinXSpeed
Me.SpinSpeedZ = SpinZSpeed
Me.SpinX = SpinX
Me.SpinZ = SpinZ
Select Case MovementCurve
Case Curves.EaseIn
InterpolationSpeed = 0.0F
Case Curves.EaseOut
InterpolationSpeed = MoveSpeed
Case Curves.EaseInAndOut
InterpolationSpeed = 0.0F
Case Curves.NoEase
InterpolationSpeed = MoveSpeed
End Select
Me.AnimationType = AnimationTypes.Move
End Sub
Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal Destination As Vector3, ByVal Speed As Single, ByVal startDelay As Single, ByVal endDelay As Single)
Me.New(Position, Texture, Scale, Destination, Speed, False, False, startDelay, endDelay)
End Sub
Me.New(Position, Texture, Scale, Destination, Speed, False, False, startDelay, endDelay, 0.1, 0.1, 2)
End Sub
Public Overrides Sub DoActionUpdate()
Spin()
@ -45,90 +72,124 @@
End Sub
Private Sub Move()
If Me.Position.X < Me.Destination.X Then
Me.Position.X += Me.MoveSpeed
Select Case MovementCurve
Case Curves.EaseIn
If EasedIn = False Then
If InterpolationSpeed < MoveSpeed Then
InterpolationSpeed += MoveSpeed / 10
Else
EasedIn = True
InterpolationSpeed = MoveSpeed
End If
End If
Case Curves.EaseOut
If EasedOut = False Then
If InterpolationSpeed > 0 Then
InterpolationSpeed -= MoveSpeed / 10
Else
EasedOut = True
InterpolationSpeed = 0
End If
End If
Case Curves.EaseInAndOut
If EasedIn = False Then
If InterpolationSpeed < MoveSpeed Then
InterpolationSpeed += MoveSpeed / 10
Else
EasedIn = True
InterpolationSpeed = MoveSpeed
End If
Else
If EasedOut = False Then
If InterpolationSpeed > 0 Then
InterpolationSpeed -= MoveSpeed / 10
Else
EasedOut = True
InterpolationSpeed = 0
End If
End If
End If
End Select
If MovementCurve = Curves.Linear Then
If Me.Position.X < Me.Destination.X Then
Me.Position.X += Me.MoveSpeed
If Me.Position.X >= Me.Destination.X Then
Me.Position.X = Me.Destination.X
End If
ElseIf Me.Position.X > Me.Destination.X Then
Me.Position.X -= Me.MoveSpeed
If Me.Position.X >= Me.Destination.X Then
Me.Position.X = Me.Destination.X
End If
ElseIf Me.Position.X > Me.Destination.X Then
Me.Position.X -= Me.MoveSpeed
If Me.Position.X <= Me.Destination.X Then
Me.Position.X = Me.Destination.X
End If
End If
If Me.Position.Y < Me.Destination.Y Then
Me.Position.Y += Me.MoveSpeed
If Me.Position.X <= Me.Destination.X Then
Me.Position.X = Me.Destination.X
End If
End If
If Me.Position.Y < Me.Destination.Y Then
Me.Position.Y += Me.MoveSpeed
If Me.Position.Y >= Me.Destination.Y Then
Me.Position.Y = Me.Destination.Y
End If
ElseIf Me.Position.Y > Me.Destination.Y Then
Me.Position.Y -= Me.MoveSpeed
If Me.Position.Y >= Me.Destination.Y Then
Me.Position.Y = Me.Destination.Y
End If
ElseIf Me.Position.Y > Me.Destination.Y Then
Me.Position.Y -= Me.MoveSpeed
If Me.Position.Y <= Me.Destination.Y Then
Me.Position.Y = Me.Destination.Y
End If
End If
If Me.Position.Z < Me.Destination.Z Then
Me.Position.Z += Me.MoveSpeed
If Me.Position.Y <= Me.Destination.Y Then
Me.Position.Y = Me.Destination.Y
End If
End If
If Me.Position.Z < Me.Destination.Z Then
Me.Position.Z += Me.MoveSpeed
If Me.Position.Z >= Me.Destination.Z Then
Me.Position.Z = Me.Destination.Z
End If
ElseIf Me.Position.Z > Me.Destination.Z Then
Me.Position.Z -= Me.MoveSpeed
If Me.Position.Z >= Me.Destination.Z Then
Me.Position.Z = Me.Destination.Z
End If
ElseIf Me.Position.Z > Me.Destination.Z Then
Me.Position.Z -= Me.MoveSpeed
If Me.Position.Z <= Me.Destination.Z Then
Me.Position.Z = Me.Destination.Z
End If
End If
If Me.Position.Z <= Me.Destination.Z Then
Me.Position.Z = Me.Destination.Z
End If
End If
Else
If Me.Position.X < Me.Destination.X Then
Me.Position.X = MathHelper.Lerp(Me.Position.X, Me.Destination.X, Me.InterpolationSpeed)
If Me.Position.X > Me.Destination.X - 0.05 Then
Me.Position.X = Me.Destination.X
End If
ElseIf Me.Position.X > Me.Destination.X Then
Me.Position.X = MathHelper.Lerp(Me.Position.X, Me.Destination.X, Me.InterpolationSpeed)
If Me.Position.X < Me.Destination.X + 0.05 Then
Me.Position.X = Me.Destination.X
End If
End If
If Me.Position.Y < Me.Destination.Y Then
Me.Position.Y = MathHelper.Lerp(Me.Position.Y, Me.Destination.Y, Me.InterpolationSpeed)
If Me.Position.Y > Me.Destination.Y - 0.05 Then
Me.Position.Y = Me.Destination.Y
End If
ElseIf Me.Position.Y > Me.Destination.Y Then
Me.Position.Y = MathHelper.Lerp(Me.Position.Y, Me.Destination.Y, Me.InterpolationSpeed)
If Me.Position.Y < Me.Destination.Y + 0.05 Then
Me.Position.Y = Me.Destination.Y
End If
End If
If Me.Position.Z < Me.Destination.Z Then
Me.Position.Z = MathHelper.Lerp(Me.Position.Z, Me.Destination.Z, Me.InterpolationSpeed)
If Me.Position.Z > Me.Destination.Z - 0.05 Then
Me.Position.Z = Me.Destination.Z
End If
ElseIf Me.Position.Z > Me.Destination.Z Then
Me.Position.Z = MathHelper.Lerp(Me.Position.Z, Me.Destination.Z, Me.InterpolationSpeed)
If Me.Position.Z < Me.Destination.Z + 0.05 Then
Me.Position.Z = Me.Destination.Z
End If
End If
End If
'Dim x As Integer = 0
'Dim y As Integer = 0
'Dim z As Integer = 0
If Me.Position = Destination Then
Me.Ready = True
End If
'If Destination.X < Me.Position.X Then
' x = -1
'ElseIf Destination.X > Me.Position.X Then
' x = 1
'End If
'If Destination.Y < Me.Position.Y Then
' y = -1
'ElseIf Destination.X > Me.Position.Y Then
' y = 1
'End If
'If Destination.Z < Me.Position.Z Then
' z = -1
'ElseIf Destination.Z > Me.Position.Z Then
' z = 1
'End If
'Dim v As Vector3 = New Vector3(x, y, z) * Speed
'Position.X += v.X
'Position.Z += v.Z
'Position.Y += v.Y
'If CInt(Destination.X) = CInt(Me.Position.X) Then
' If Functions.ToPositive(Me.Position.X - Destination.X) <= Me.Speed Then
' Me.Position.X = CInt(Me.Position.X)
' End If
'End If
'If CInt(Destination.Y) = CInt(Me.Position.Y) Then
' If Functions.ToPositive(Me.Position.Y - Destination.Y) <= Me.Speed + 0.01F Then
' Me.Position.Y = CInt(Me.Position.Y)
' End If
'End If
'If CInt(Destination.Z) = CInt(Me.Position.Z) Then
' If Functions.ToPositive(Me.Position.Z - Destination.Z) <= Me.Speed Then
' Me.Position.Z = CInt(Me.Position.Z)
' End If
'End If
If Me.Position = Destination Then
Me.Ready = True
End If
End Sub
End Sub
End Class

View File

@ -6,9 +6,9 @@
Public FadeIn As Boolean = False
Public EndState As Single = 0.0F
Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single)
Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal StartState As Single = 1.0F)
MyBase.New(Position, Texture, Scale, startDelay, endDelay)
MyBase.Opacity = StartState
Me.EndState = EndState
Me.FadeIn = FadeIn
Me.TransitionSpeed = TransitionSpeed

View File

@ -2,23 +2,17 @@
Inherits BattleAnimation3D
Public Enum Anchors
Top
Left
Right
Bottom
End Enum
Public Grow As Boolean = False
Public EndSize As Vector3
Public SizeSpeed As Single = 0.01F
Public Anchor() As Anchors = {Anchors.Bottom}
Public Anchors As String
Public Change As New Vector3(1)
Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal Grow As Boolean, ByVal EndSize As Vector3, ByVal SizeSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single)
Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal Grow As Boolean, ByVal EndSize As Vector3, ByVal SizeSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single, ByVal Anchors As String)
MyBase.New(Position, Texture, Scale, startDelay, endDelay)
Me.Anchors = Anchors
Me.Grow = Grow
Me.EndSize = EndSize
Me.SizeSpeed = SizeSpeed
@ -79,19 +73,23 @@
End If
End If
If Anchor.Contains(Anchors.Bottom) = True Then
'Bottom
If Anchors.Contains("1") = True Then
Dim diffY As Single = saveScale.Y - Me.Scale.Y
Me.Position.Y -= diffY / 2
End If
If Anchor.Contains(Anchors.Top) = True Then
'Top
If Anchors.Contains("2") = True Then
Dim diffY As Single = saveScale.Y - Me.Scale.Y
Me.Position.Y += diffY / 2
End If
If Anchor.Contains(Anchors.Left) = True Then
'Left
If Anchors.Contains("3") = True Then
Dim diffX As Single = saveScale.X - Me.Scale.X
Me.Position.X -= diffX / 2
End If
If Anchor.Contains(Anchors.Right) = True Then
'Right
If Anchors.Contains("4") = True Then
Dim diffX As Single = saveScale.X - Me.Scale.X
Me.Position.X += diffX / 2
End If

View File

@ -0,0 +1,28 @@
Public Class BASound
Inherits BattleAnimation3D
Private soundfile As String
Private stopMusic As Boolean
Private IsPokemon As Boolean
Public Sub New(ByVal sound As String, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal stopMusic As Boolean = False, Optional ByVal IsPokemon As Boolean = False)
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
Me.Scale = New Vector3(1.0F)
soundfile = sound
Me.Visible = False
Me.stopMusic = stopMusic
Me.IsPokemon = IsPokemon
AnimationType = AnimationTypes.Sound
End Sub
Public Overrides Sub DoActionActive()
If IsPokemon = True Then
SoundManager.PlayPokemonCry(CInt(soundfile))
Else
SoundManager.PlaySound(soundfile, stopMusic)
End If
Me.Ready = True
End Sub
End Class

View File

@ -1,24 +1,26 @@
Public Class BattleAnimation3D
Inherits Entity
Public Enum AnchorTypes
Top
Left
Right
Bottom
End Enum
Public Enum AnimationTypes
[Nothing]
Move
Transition
Size
Opacity
Rotation
Texture
Wait
ViewPokeBill
BillMove
Sound
End Enum
Public AnimationType As AnimationTypes = AnimationTypes.Nothing
Public CanRemove As Boolean = False
Public Ready As Boolean = False
Public startDelay As Single
Public endDelay As Single
@ -82,7 +84,9 @@
Public Overrides Sub Render()
If Me.startDelay <= 0.0F Then
Draw(Me.Model, Me.Textures, True)
If CanRemove = False Then
Draw(Me.Model, Me.Textures, True)
End If
End If
End Sub

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,242 @@
Namespace BattleSystem
Public Class AnimationQueryObject
Inherits QueryObject
Public AnimationStarted As Boolean = False
Public AnimationEnded As Boolean = False
Public BAFlipped As Boolean
Public AnimationSequence As List(Of BattleAnimation3D)
Public CurrentEntity As Entity
Public CurrentModel As ModelEntity
Public Overrides ReadOnly Property IsReady As Boolean
Get
Return AnimationEnded
End Get
End Property
Public Sub New(ByVal entity As NPC, ByVal BAFlipped As Boolean, Optional ByVal model As ModelEntity = Nothing)
MyBase.New(QueryTypes.MoveAnimation)
Me.AnimationSequence = New List(Of BattleAnimation3D)
Me.BAFlipped = BAFlipped
Me.CurrentEntity = entity
Me.CurrentModel = model
AnimationSequenceBegin()
End Sub
Public Overrides Sub Draw(ByVal BV2Screen As BattleScreen)
Dim RenderObjects As New List(Of Entity)
For Each a As BattleAnimation3D In Me.AnimationSequence
RenderObjects.Add(a)
Next
If RenderObjects.Count > 0 Then
RenderObjects = (From r In RenderObjects Order By r.CameraDistance Descending).ToList()
End If
For Each [Object] As Entity In RenderObjects
[Object].Render()
Next
End Sub
Public Overrides Sub Update(BV2Screen As BattleScreen)
If AnimationStarted = True Then
For i = 0 To AnimationSequence.Count - 1
If i <= AnimationSequence.Count - 1 Then
Dim a As BattleAnimation3D = AnimationSequence(i)
If a.CanRemove = True Then
i -= 1
AnimationSequence.Remove(a)
Else
a.Update()
End If
End If
Next
If AnimationSequence.Count <= 0 Then
AnimationSequenceEnd()
End If
For Each Animation As BattleAnimation3D In AnimationSequence
Animation.UpdateEntity()
Next
End If
End Sub
Public Sub AnimationSequenceBegin()
If CurrentEntity Is Nothing Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AnimationSequenceBegin OUTSIDE OF ATTACK ANIMATION DELEGATE")
ElseIf AnimationStarted Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AnimationSequenceBegin INSIDE ANIMATION SEQUENCE, DID YOU MEAN AnimationSequenceEnd?")
Else
AnimationStarted = True
End If
End Sub
Public Sub AnimationSequenceEnd()
If CurrentEntity Is Nothing Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AnimationSequenceEnd OUTSIDE OF ATTACK ANIMATION DELEGATE")
ElseIf Not AnimationStarted Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AnimationSequenceEnd BEFORE CALLING AnimationSequenceBegin")
Else
AnimationEnded = True
End If
End Sub
Public Sub AnimationSpawnFadingEntity(ByVal PositionX As Single, ByVal PositionY As Single, ByVal PositionZ As Single, ByVal Texture As String, ByVal ScaleX As Single, ByVal ScaleY As Single, ByVal ScaleZ As Single, ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal startState As Single = 1.0F)
If CurrentEntity Is Nothing Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation OUTSIDE OF ATTACK ANIMATION DELEGATE")
ElseIf Not AnimationStarted Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation BEFORE CALLING AnimationSequenceBegin")
Else
Dim stringArray = Texture.Split(","c)
Dim texture2D As Texture2D = Nothing
If stringArray.Length = 1 Then
texture2D = TextureManager.GetTexture(Texture)
ElseIf stringArray.Length = 5 Then
Dim r As Rectangle = New Rectangle(CInt(stringArray(1)), CInt(stringArray(2)), CInt(stringArray(3)), CInt(stringArray(4)))
texture2D = TextureManager.GetTexture(stringArray(0), r, "")
End If
If BAFlipped Then
PositionX -= PositionX * 2.0F
PositionZ -= PositionZ * 2.0F
End If
Dim Position As Vector3 = New Vector3(CurrentEntity.Position.X + PositionX, CurrentEntity.Position.Y + PositionY, CurrentEntity.Position.Z + PositionZ)
Dim Scale As Vector3 = New Vector3(ScaleX, ScaleY, ScaleZ)
Dim baOpacity As BAOpacity = New BAOpacity(Position, texture2D, Scale, TransitionSpeed, FadeIn, EndState, startDelay, endDelay, startState)
AnimationSequence.Add(baOpacity)
End If
End Sub
Public Sub AnimationSpawnMovingEntity(ByVal PositionX As Single, ByVal PositionY As Single, ByVal PositionZ As Single, ByVal Texture As String, ByVal ScaleX As Single, ByVal ScaleY As Single, ByVal ScaleZ As Single, ByVal DestinationX As Single, ByVal DestinationY As Single, ByVal DestinationZ As Single, ByVal Speed As Single, ByVal SpinX As Boolean, ByVal SpinZ As Boolean, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal SpinXSpeed As Single = 0.1F, Optional ByVal SpinZSpeed As Single = 0.1F, Optional MovementCurve As Integer = 3)
If CurrentEntity Is Nothing Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation OUTSIDE OF ATTACK ANIMATION DELEGATE")
ElseIf Not AnimationStarted Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation BEFORE CALLING AnimationSequenceBegin")
Else
Dim stringArray = Texture.Split(","c)
Dim texture2D As Texture2D = Nothing
If stringArray.Length = 1 Then
texture2D = TextureManager.GetTexture(Texture)
ElseIf stringArray.Length = 5 Then
Dim r As Rectangle = New Rectangle(CInt(stringArray(1)), CInt(stringArray(2)), CInt(stringArray(3)), CInt(stringArray(4)))
texture2D = TextureManager.GetTexture(stringArray(0), r, "")
End If
If BAFlipped Then
PositionX -= PositionX * 2.0F
PositionZ -= PositionZ * 2.0F
DestinationX -= DestinationX * 2.0F
DestinationZ -= DestinationZ * 2.0F
SpinXSpeed -= SpinXSpeed * 2.0F
SpinZSpeed -= SpinZSpeed * 2.0F
End If
Dim Position As Vector3 = New Vector3(CurrentEntity.Position.X + PositionX, CurrentEntity.Position.Y + PositionY, CurrentEntity.Position.Z + PositionZ)
Dim Scale As Vector3 = New Vector3(ScaleX, ScaleY, ScaleZ)
Dim Destination As Vector3 = New Vector3(CurrentEntity.Position.X + DestinationX, CurrentEntity.Position.Y + DestinationY, CurrentEntity.Position.Z + DestinationZ)
Dim baMove As BAMove = New BAMove(Position, texture2D, Scale, Destination, Speed, SpinX, SpinZ, startDelay, endDelay, SpinXSpeed, SpinZSpeed, MovementCurve)
AnimationSequence.Add(baMove)
End If
End Sub
Public Sub AnimationMovePokemonEntity(ByVal DestinationX As Single, ByVal DestinationY As Single, ByVal DestinationZ As Single, ByVal Speed As Single, ByVal SpinX As Boolean, ByVal SpinZ As Boolean, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal SpinXSpeed As Single = 0.1F, Optional ByVal SpinZSpeed As Single = 0.1F, Optional MovementCurve As Integer = 3)
If CurrentEntity Is Nothing Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation OUTSIDE OF ATTACK ANIMATION DELEGATE")
ElseIf Not AnimationStarted Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation BEFORE CALLING AnimationSequenceBegin")
Else
If BAFlipped Then
DestinationX -= DestinationX * 2.0F
DestinationZ -= DestinationZ * 2.0F
End If
Dim Destination As Vector3 = New Vector3(CurrentEntity.Position.X + DestinationX, CurrentEntity.Position.Y + DestinationY, CurrentEntity.Position.Z + DestinationZ)
Dim baBillMove As BABillMove = New BABillMove(CurrentEntity, Destination, Speed, SpinX, SpinZ, startDelay, endDelay, SpinXSpeed, SpinZSpeed, MovementCurve)
AnimationSequence.Add(baBillMove)
If Me.CurrentModel IsNot Nothing Then
Dim baModelMove As BABillMove = New BABillMove(CType(CurrentModel, Entity), Destination, Speed, SpinX, SpinZ, startDelay, endDelay, SpinXSpeed, SpinZSpeed, MovementCurve)
AnimationSequence.Add(baModelMove)
End If
End If
End Sub
Public Sub AnimationFadePokemonEntity(ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal startState As Single = -1.0F)
If CurrentEntity Is Nothing Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation OUTSIDE OF ATTACK ANIMATION DELEGATE")
ElseIf Not AnimationStarted Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation BEFORE CALLING AnimationSequenceBegin")
Else
If startState = -1.0F Then startState = CurrentEntity.Opacity
Dim baBillOpacity As BABillOpacity = New BABillOpacity(CurrentEntity, TransitionSpeed, FadeIn, EndState, startDelay, endDelay, startState)
AnimationSequence.Add(baBillOpacity)
If Me.CurrentModel IsNot Nothing Then
Dim baModelOpacity As BABillOpacity = New BABillOpacity(CType(CurrentModel, Entity), TransitionSpeed, FadeIn, EndState, startDelay, endDelay, startState)
AnimationSequence.Add(baModelOpacity)
End If
End If
End Sub
Public Sub AnimationPlaySound(ByVal sound As String, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal stopMusic As Boolean = False, Optional ByVal IsPokemon As Boolean = False)
If CurrentEntity Is Nothing Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AnimationPlaySound OUTSIDE OF ATTACK ANIMATION DELEGATE")
ElseIf Not AnimationStarted Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AnimationPlaySound BEFORE CALLING AnimationSequenceBegin")
Else
Dim baSound As BASound = New BASound(sound, startDelay, endDelay, stopMusic, IsPokemon)
AnimationSequence.Add(baSound)
End If
End Sub
Public Sub AnimationSpawnScalingEntity(ByVal PositionX As Single, ByVal PositionY As Single, ByVal PositionZ As Single, ByVal Texture As String, ByVal ScaleX As Single, ByVal ScaleY As Single, ByVal ScaleZ As Single, 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")
If CurrentEntity Is Nothing Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnSizeAnimation OUTSIDE OF ATTACK ANIMATION DELEGATE")
ElseIf Not AnimationStarted Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnSizeAnimation BEFORE CALLING AnimationSequenceBegin")
Else
Dim stringArray = Texture.Split(","c)
Dim texture2D As Texture2D = Nothing
If stringArray.Length = 1 Then
texture2D = TextureManager.GetTexture(Texture)
ElseIf stringArray.Length = 5 Then
Dim r As Rectangle = New Rectangle(CInt(stringArray(1)), CInt(stringArray(2)), CInt(stringArray(3)), CInt(stringArray(4)))
texture2D = TextureManager.GetTexture(stringArray(0), r, "")
End If
If BAFlipped Then
PositionX -= PositionX * 2.0F
PositionZ -= PositionZ * 2.0F
End If
Dim Position As Vector3 = New Vector3(CurrentEntity.Position.X + PositionX, CurrentEntity.Position.Y + PositionY, CurrentEntity.Position.Z + PositionZ)
Dim Scale As Vector3 = New Vector3(ScaleX, ScaleY, ScaleZ)
Dim EndSize As Vector3 = New Vector3(EndSizeX, EndSizeY, EndSizeZ)
Dim baSize As BASize = New BASize(Position, texture2D, Scale, Grow, EndSize, SizeSpeed, startDelay, endDelay, Anchors)
AnimationSequence.Add(baSize)
End If
End Sub
Public Sub AnimationScalePokemonEntity(ByVal entity As Entity, ByVal PositionX As Single, ByVal PositionY As Single, ByVal PositionZ As Single, ByVal Texture As String, ByVal ScaleX As Single, ByVal ScaleY As Single, ByVal ScaleZ As Single, 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")
If CurrentEntity Is Nothing Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnSizeAnimation OUTSIDE OF ATTACK ANIMATION DELEGATE")
ElseIf Not AnimationStarted Then
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnSizeAnimation BEFORE CALLING AnimationSequenceBegin")
Else
Dim stringArray = Texture.Split(","c)
If BAFlipped Then
PositionX -= PositionX * 2.0F
PositionZ -= PositionZ * 2.0F
End If
Dim Position As Vector3 = New Vector3(CurrentEntity.Position.X + PositionX, CurrentEntity.Position.Y + PositionY, CurrentEntity.Position.Z + PositionZ)
Dim Scale As Vector3 = New Vector3(ScaleX, ScaleY, ScaleZ)
Dim EndSize As Vector3 = New Vector3(EndSizeX, EndSizeY, EndSizeZ)
Dim baBillSize As BABillSize = New BABillSize(entity, Scale, Grow, EndSize, SizeSpeed, startDelay, endDelay, Anchors)
AnimationSequence.Add(baBillSize)
End If
End Sub
End Class
End Namespace

View File

@ -2,7 +2,7 @@
@text.show(Yeah, I am the designated healer.*Let me heal your Pokémon!)
@screen.fadeout
@pokemon.heal
@sound.play(pokemon_heal,true)
@sound.play(Heal_Party,true)
@level.wait(200)
@screen.fadein
@text.show(There you go!*The boss said there should~be someone trying to stop us,~so we need to be in~tip-top shape!*Let me know if you~need to be healed up!)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More