mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-25 23:05:24 +02:00
Battle Animation System Rework about halfway done
Updated to work with the new animation system: - Catch animation - Burn animation - Attack: Tackle
This commit is contained in:
parent
b95d4d1c69
commit
7ff7f96a47
@ -1,4 +1,4 @@
|
|||||||
Public Class BABillMove
|
Public Class BAEntityMove
|
||||||
|
|
||||||
Inherits BattleAnimation3D
|
Inherits BattleAnimation3D
|
||||||
|
|
||||||
@ -20,7 +20,7 @@
|
|||||||
Linear
|
Linear
|
||||||
End Enum
|
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)
|
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)
|
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||||
|
|
||||||
Me.Destination = Destination
|
Me.Destination = Destination
|
||||||
@ -33,7 +33,7 @@
|
|||||||
Me.SpinSpeedZ = SpinZSpeed
|
Me.SpinSpeedZ = SpinZSpeed
|
||||||
|
|
||||||
Me.Visible = False
|
Me.Visible = False
|
||||||
Me.TargetEntity = entity
|
Me.TargetEntity = Entity
|
||||||
|
|
||||||
Select Case MovementCurve
|
Select Case MovementCurve
|
||||||
Case Curves.EaseIn
|
Case Curves.EaseIn
|
@ -1,4 +1,4 @@
|
|||||||
Public Class BABillOpacity
|
Public Class BAEntityOpacity
|
||||||
|
|
||||||
Inherits BattleAnimation3D
|
Inherits BattleAnimation3D
|
||||||
|
|
131
P3D/Battle/BattleAnimations/BAEntityRotate.vb
Normal file
131
P3D/Battle/BattleAnimations/BAEntityRotate.vb
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
Public Class BAEntityRotate
|
||||||
|
|
||||||
|
Inherits BattleAnimation3D
|
||||||
|
|
||||||
|
Dim TargetEntity As Entity
|
||||||
|
Dim RotationSpeedVector As Vector3
|
||||||
|
Dim EndRotation As Vector3
|
||||||
|
Dim DoReturn As Boolean = False
|
||||||
|
Dim ReturnVector As Vector3
|
||||||
|
Dim hasReturned As Boolean = False
|
||||||
|
Dim DoRotation As Vector3 = New Vector3(1.0F)
|
||||||
|
|
||||||
|
Public Sub New(ByVal Entity As Entity, ByVal RotationSpeedVector As Vector3, ByVal EndRotation As Vector3, ByVal startDelay As Single, ByVal endDelay As Single)
|
||||||
|
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||||
|
|
||||||
|
Me.RotationSpeedVector = RotationSpeedVector
|
||||||
|
Me.EndRotation = EndRotation
|
||||||
|
Me.ReturnVector = Me.Rotation
|
||||||
|
Me.TargetEntity = Entity
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub New(ByVal Entity As Entity, ByVal RotationSpeedVector As Vector3, ByVal EndRotation As Vector3, ByVal startDelay As Single, ByVal endDelay As Single, ByVal DoXRotation As Boolean, ByVal DoYRotation As Boolean, ByVal DoZRotation As Boolean)
|
||||||
|
Me.New(Entity, RotationSpeedVector, EndRotation, startDelay, endDelay)
|
||||||
|
|
||||||
|
If DoXRotation = False Then
|
||||||
|
DoRotation.X = 0.0F
|
||||||
|
End If
|
||||||
|
If DoYRotation = False Then
|
||||||
|
DoRotation.Y = 0.0F
|
||||||
|
End If
|
||||||
|
If DoZRotation = False Then
|
||||||
|
DoRotation.Z = 0.0F
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub New(ByVal Entity As Entity, ByVal RotationSpeedVector As Vector3, ByVal EndRotation As Vector3, ByVal startDelay As Single, ByVal endDelay As Single, ByVal DoXRotation As Boolean, ByVal DoYRotation As Boolean, ByVal DoZRotation As Boolean, ByVal DoReturn As Boolean)
|
||||||
|
Me.New(Entity, RotationSpeedVector, EndRotation, startDelay, endDelay, DoXRotation, DoYRotation, DoZRotation)
|
||||||
|
|
||||||
|
Me.DoReturn = DoReturn
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub DoActionActive()
|
||||||
|
If VectorReached() = False Then
|
||||||
|
|
||||||
|
If DoRotation.X = 1.0F Then
|
||||||
|
If TargetEntity.Rotation.X > Me.EndRotation.X Then
|
||||||
|
TargetEntity.Rotation.X += Me.RotationSpeedVector.X
|
||||||
|
|
||||||
|
If TargetEntity.Rotation.X <= Me.EndRotation.X Then
|
||||||
|
TargetEntity.Rotation.X = Me.EndRotation.X
|
||||||
|
End If
|
||||||
|
ElseIf TargetEntity.Rotation.X < Me.EndRotation.X Then
|
||||||
|
TargetEntity.Rotation.X += Me.RotationSpeedVector.X
|
||||||
|
|
||||||
|
If TargetEntity.Rotation.X >= Me.EndRotation.X Then
|
||||||
|
TargetEntity.Rotation.X = Me.EndRotation.X
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If DoRotation.Y = 1.0F Then
|
||||||
|
If TargetEntity.Rotation.Y > Me.EndRotation.Y Then
|
||||||
|
TargetEntity.Rotation.Y += Me.RotationSpeedVector.Y
|
||||||
|
|
||||||
|
If TargetEntity.Rotation.Y <= Me.EndRotation.Y Then
|
||||||
|
TargetEntity.Rotation.Y = Me.EndRotation.Y
|
||||||
|
End If
|
||||||
|
ElseIf TargetEntity.Rotation.Y < Me.EndRotation.Y Then
|
||||||
|
TargetEntity.Rotation.Y += Me.RotationSpeedVector.Y
|
||||||
|
|
||||||
|
If TargetEntity.Rotation.Y >= Me.EndRotation.Y Then
|
||||||
|
TargetEntity.Rotation.Y = Me.EndRotation.Y
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If DoRotation.Z = 1.0F Then
|
||||||
|
If TargetEntity.Rotation.Z > Me.EndRotation.Z Then
|
||||||
|
TargetEntity.Rotation.Z += Me.RotationSpeedVector.Z
|
||||||
|
|
||||||
|
If TargetEntity.Rotation.Z <= Me.EndRotation.Z Then
|
||||||
|
TargetEntity.Rotation.Z = Me.EndRotation.Z
|
||||||
|
End If
|
||||||
|
ElseIf TargetEntity.Rotation.Z < Me.EndRotation.Z Then
|
||||||
|
TargetEntity.Rotation.Z += Me.RotationSpeedVector.Z
|
||||||
|
|
||||||
|
If TargetEntity.Rotation.Z >= Me.EndRotation.Z Then
|
||||||
|
TargetEntity.Rotation.Z = Me.EndRotation.Z
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If VectorReached() = True Then
|
||||||
|
RotationReady()
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
RotationReady()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RotationReady()
|
||||||
|
If Me.DoReturn = True And Me.hasReturned = False Then
|
||||||
|
Me.hasReturned = True
|
||||||
|
Me.EndRotation = Me.ReturnVector
|
||||||
|
Me.RotationSpeedVector = New Vector3(Me.RotationSpeedVector.X * -1, Me.RotationSpeedVector.Y * -1, Me.RotationSpeedVector.Z * -1)
|
||||||
|
Else
|
||||||
|
Me.Ready = True
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function VectorReached() As Boolean
|
||||||
|
If DoRotation.X = 1.0F Then
|
||||||
|
If EndRotation.X <> TargetEntity.Rotation.X Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If DoRotation.Y = 1.0F Then
|
||||||
|
If EndRotation.Y <> TargetEntity.Rotation.Y Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If DoRotation.Z = 1.0F Then
|
||||||
|
If EndRotation.Z <> TargetEntity.Rotation.Z Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
@ -1,4 +1,4 @@
|
|||||||
Public Class BABillSize
|
Public Class BAEntityScale
|
||||||
|
|
||||||
Inherits BattleAnimation3D
|
Inherits BattleAnimation3D
|
||||||
|
|
21
P3D/Battle/BattleAnimations/BAEntityTextureChange.vb
Normal file
21
P3D/Battle/BattleAnimations/BAEntityTextureChange.vb
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
Public Class BAEntityTextureChange
|
||||||
|
|
||||||
|
Inherits BattleAnimation3D
|
||||||
|
|
||||||
|
Public Texture As Texture2D
|
||||||
|
Public TargetEntity As Entity
|
||||||
|
|
||||||
|
Public Sub New(ByVal Entity As Entity, Texture As Texture2D, ByVal startDelay As Single, ByVal endDelay As Single)
|
||||||
|
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
|
||||||
|
|
||||||
|
Me.TargetEntity = Entity
|
||||||
|
Me.Texture = Texture
|
||||||
|
Me.AnimationType = AnimationTypes.Texture
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub DoActionActive()
|
||||||
|
TargetEntity.Textures = {Me.Texture}
|
||||||
|
Me.Ready = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
@ -10,7 +10,7 @@
|
|||||||
Public InterpolationSpeed As Single
|
Public InterpolationSpeed As Single
|
||||||
Public SpinSpeedX As Single = 0.1F
|
Public SpinSpeedX As Single = 0.1F
|
||||||
Public SpinSpeedZ As Single = 0.1F
|
Public SpinSpeedZ As Single = 0.1F
|
||||||
Public MovementCurve As Integer = 2
|
Public MovementCurve As Integer = 3
|
||||||
|
|
||||||
Private EasedIn As Boolean = False
|
Private EasedIn As Boolean = False
|
||||||
Private EasedOut As Boolean = False
|
Private EasedOut As Boolean = False
|
||||||
|
@ -1,106 +0,0 @@
|
|||||||
Public Class BASize
|
|
||||||
|
|
||||||
Inherits BattleAnimation3D
|
|
||||||
|
|
||||||
Public Grow As Boolean = False
|
|
||||||
Public EndSize As Vector3
|
|
||||||
Public SizeSpeed As Single = 0.01F
|
|
||||||
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, ByVal Anchors As String)
|
|
||||||
MyBase.New(Position, Texture, Scale, startDelay, endDelay)
|
|
||||||
|
|
||||||
Me.Anchors = Anchors
|
|
||||||
Me.Grow = Grow
|
|
||||||
Me.EndSize = EndSize
|
|
||||||
Me.SizeSpeed = SizeSpeed
|
|
||||||
|
|
||||||
Me.AnimationType = AnimationTypes.Size
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Overrides Sub DoActionActive()
|
|
||||||
Dim saveScale As Vector3 = Me.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 Me.Scale.X < Me.EndSize.X Then
|
|
||||||
Me.Scale.X += changeX
|
|
||||||
|
|
||||||
If Me.Scale.X >= Me.EndSize.X Then
|
|
||||||
Me.Scale.X = Me.EndSize.X
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If Me.Scale.Y < Me.EndSize.Y Then
|
|
||||||
Me.Scale.Y += changeY
|
|
||||||
|
|
||||||
If Me.Scale.Y >= Me.EndSize.Y Then
|
|
||||||
Me.Scale.Y = Me.EndSize.Y
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If Me.Scale.Z < Me.EndSize.Z Then
|
|
||||||
Me.Scale.Z += changeZ
|
|
||||||
|
|
||||||
If Me.Scale.Z >= Me.EndSize.Z Then
|
|
||||||
Me.Scale.Z = Me.EndSize.Z
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If Me.Scale.X > Me.EndSize.X Then
|
|
||||||
Me.Scale.X -= changeX
|
|
||||||
|
|
||||||
If Me.Scale.X <= Me.EndSize.X Then
|
|
||||||
Me.Scale.X = Me.EndSize.X
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If Me.Scale.Y > Me.EndSize.Y Then
|
|
||||||
Me.Scale.Y -= changeY
|
|
||||||
|
|
||||||
If Me.Scale.Y <= Me.EndSize.Y Then
|
|
||||||
Me.Scale.Y = Me.EndSize.Y
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If Me.Scale.Z > Me.EndSize.Z Then
|
|
||||||
Me.Scale.Z -= changeZ
|
|
||||||
|
|
||||||
If Me.Scale.Z <= Me.EndSize.Z Then
|
|
||||||
Me.Scale.Z = Me.EndSize.Z
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'Bottom
|
|
||||||
If Anchors.Contains("1") = True Then
|
|
||||||
Dim diffY As Single = saveScale.Y - Me.Scale.Y
|
|
||||||
Me.Position.Y -= diffY / 2
|
|
||||||
End If
|
|
||||||
'Top
|
|
||||||
If Anchors.Contains("2") = True Then
|
|
||||||
Dim diffY As Single = saveScale.Y - Me.Scale.Y
|
|
||||||
Me.Position.Y += diffY / 2
|
|
||||||
End If
|
|
||||||
'Left
|
|
||||||
If Anchors.Contains("3") = True Then
|
|
||||||
Dim diffX As Single = saveScale.X - Me.Scale.X
|
|
||||||
Me.Position.X -= diffX / 2
|
|
||||||
End If
|
|
||||||
'Right
|
|
||||||
If Anchors.Contains("4") = True Then
|
|
||||||
Dim diffX As Single = saveScale.X - Me.Scale.X
|
|
||||||
Me.Position.X += diffX / 2
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Me.EndSize = Me.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
|
|
@ -2705,14 +2705,20 @@
|
|||||||
p.Status = Pokemon.StatusProblems.Burn
|
p.Status = Pokemon.StatusProblems.Burn
|
||||||
ChangeCameraAngle(1, own, BattleScreen)
|
ChangeCameraAngle(1, own, BattleScreen)
|
||||||
'Burn animation
|
'Burn animation
|
||||||
Dim BurnAnimation As AnimationQueryObject = New AnimationQueryObject(CType(pNPC, NPC), own)
|
Dim BurnAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own)
|
||||||
BurnAnimation.AnimationPlaySound("Battle\Effects\Burned", 0, 0)
|
BurnAnimation.AnimationPlaySound("Battle\Effects\Burned", 0, 0)
|
||||||
BurnAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
|
Dim FlameEntity As Entity = BurnAnimation.SpawnEntity(New Vector3(CSng(pNPC.Position.X - 0.25), CSng(pNPC.Position.Y - 0.25), CSng(pNPC.Position.Z - 0.25)), TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 0, 32, 32)), New Vector3(0.5, 0.5, 0.5), 1.0F)
|
||||||
BurnAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
|
BurnAnimation.AnimationChangeTexture(FlameEntity, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32)), 2, 1)
|
||||||
BurnAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
|
BurnAnimation.AnimationChangeTexture(FlameEntity, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32)), 3, 1)
|
||||||
BurnAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,96,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 4, 1)
|
BurnAnimation.AnimationChangeTexture(FlameEntity, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32)), 4, 1)
|
||||||
BurnAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,128,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 5, 1)
|
BurnAnimation.AnimationChangeTexture(FlameEntity, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32)), 5, 1)
|
||||||
|
BurnAnimation.AnimationFadeEntity(FlameEntity, 1, False, 0.0F, 6, 1, 1)
|
||||||
BattleScreen.BattleQuery.Add(BurnAnimation)
|
BattleScreen.BattleQuery.Add(BurnAnimation)
|
||||||
|
|
||||||
|
If FlameEntity.Opacity = 0.0F Then
|
||||||
|
BurnAnimation.RemoveEntity(FlameEntity)
|
||||||
|
End If
|
||||||
|
|
||||||
Select Case message
|
Select Case message
|
||||||
Case "" 'Print default message only
|
Case "" 'Print default message only
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " got burned!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " got burned!"))
|
||||||
@ -3411,7 +3417,7 @@
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'***STAT INCREASE ANIMATION***
|
'***STAT INCREASE ANIMATION***
|
||||||
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, Not own)
|
Dim StatAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, Not own)
|
||||||
Dim maxAmount As Integer = 20 * val
|
Dim maxAmount As Integer = 20 * val
|
||||||
Dim currentAmount As Integer = 0
|
Dim currentAmount As Integer = 0
|
||||||
While currentAmount <= maxAmount
|
While currentAmount <= maxAmount
|
||||||
@ -3427,11 +3433,11 @@
|
|||||||
Destination.X = xPos
|
Destination.X = xPos
|
||||||
Destination.Z = zPos
|
Destination.Z = zPos
|
||||||
Dim startDelay As Double = 5.0 * Random.NextDouble()
|
Dim startDelay As Double = 5.0 * Random.NextDouble()
|
||||||
MoveAnimation.AnimationSpawnMovingEntity(Position.X, Position.Y, Position.Z, Texture, Scale.X, Scale.Y, Scale.Z, Destination.X, Destination.Y, Destination.Z, 0.05F, False, True, CSng(startDelay), 0.0F)
|
StatAnimation.AnimationSpawnMovingEntity(Position.X, Position.Y, Position.Z, Texture, Scale.X, Scale.Y, Scale.Z, Destination.X, Destination.Y, Destination.Z, 0.05F, False, True, CSng(startDelay), 0.0F)
|
||||||
Threading.Interlocked.Increment(currentAmount)
|
Threading.Interlocked.Increment(currentAmount)
|
||||||
End While
|
End While
|
||||||
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Stat_Raise", False))
|
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Stat_Raise", False))
|
||||||
BattleScreen.BattleQuery.Add(MoveAnimation)
|
BattleScreen.BattleQuery.Add(StatAnimation)
|
||||||
|
|
||||||
Dim printMessage As String = p.GetDisplayName() & "'s " & statString
|
Dim printMessage As String = p.GetDisplayName() & "'s " & statString
|
||||||
Select Case val
|
Select Case val
|
||||||
@ -3998,11 +4004,11 @@
|
|||||||
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject(sound, False, 0.0F))
|
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject(sound, False, 0.0F))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim HitAnimation As AnimationQueryObject = New AnimationQueryObject(CType(pNPC, NPC), own)
|
Dim HitAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own)
|
||||||
HitAnimation.AnimationFadePokemonEntity(1, False, 0, 0, 0)
|
HitAnimation.AnimationFadeEntity(Nothing, 1, False, 0, 0, 0)
|
||||||
HitAnimation.AnimationFadePokemonEntity(1, True, 1, 1, 0)
|
HitAnimation.AnimationFadeEntity(Nothing, 1, True, 1, 1, 0)
|
||||||
HitAnimation.AnimationFadePokemonEntity(1, False, 0, 2, 0)
|
HitAnimation.AnimationFadeEntity(Nothing, 1, False, 0, 2, 0)
|
||||||
HitAnimation.AnimationFadePokemonEntity(1, True, 1, 3, 0)
|
HitAnimation.AnimationFadeEntity(Nothing, 1, True, 1, 3, 0)
|
||||||
BattleScreen.BattleQuery.Add(HitAnimation)
|
BattleScreen.BattleQuery.Add(HitAnimation)
|
||||||
|
|
||||||
If own = True Then
|
If own = True Then
|
||||||
@ -5415,12 +5421,19 @@
|
|||||||
'Burn animation
|
'Burn animation
|
||||||
Dim BurnAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OwnPokemonNPC, False)
|
Dim BurnAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OwnPokemonNPC, False)
|
||||||
BurnAnimation.AnimationPlaySound("Battle\Effects\Burned", 0, 0)
|
BurnAnimation.AnimationPlaySound("Battle\Effects\Burned", 0, 0)
|
||||||
BurnAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
|
|
||||||
BurnAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
|
Dim FlameEntity As Entity = BurnAnimation.SpawnEntity(New Vector3(CSng(BattleScreen.OwnPokemonNPC.Position.X + 0.25), CSng(BattleScreen.OwnPokemonNPC.Position.Y - 0.25), CSng(BattleScreen.OwnPokemonNPC.Position.Z + 0.25)), TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 0, 32, 32)), New Vector3(0.5, 0.5, 0.5), 1.0F)
|
||||||
BurnAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
|
BurnAnimation.AnimationChangeTexture(FlameEntity, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32)), 2, 1)
|
||||||
BurnAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,96,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 4, 1)
|
BurnAnimation.AnimationChangeTexture(FlameEntity, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32)), 3, 1)
|
||||||
BurnAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,128,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 5, 1)
|
BurnAnimation.AnimationChangeTexture(FlameEntity, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32)), 4, 1)
|
||||||
|
BurnAnimation.AnimationChangeTexture(FlameEntity, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32)), 5, 1)
|
||||||
|
BurnAnimation.AnimationFadeEntity(FlameEntity, 1, False, 0.0F, 6, 1, 1)
|
||||||
BattleScreen.BattleQuery.Add(BurnAnimation)
|
BattleScreen.BattleQuery.Add(BurnAnimation)
|
||||||
|
|
||||||
|
If FlameEntity.Opacity = 0.0F Then
|
||||||
|
BurnAnimation.RemoveEntity(FlameEntity)
|
||||||
|
End If
|
||||||
|
|
||||||
'Actual damage
|
'Actual damage
|
||||||
ReduceHP(reduceAmount, True, True, BattleScreen, .OwnPokemon.GetDisplayName() & " is hurt by the burn.", "burn")
|
ReduceHP(reduceAmount, True, True, BattleScreen, .OwnPokemon.GetDisplayName() & " is hurt by the burn.", "burn")
|
||||||
End If
|
End If
|
||||||
@ -6206,12 +6219,19 @@
|
|||||||
'Burn animation
|
'Burn animation
|
||||||
Dim BurnAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, False)
|
Dim BurnAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, False)
|
||||||
BurnAnimation.AnimationPlaySound("Battle\Effects\Burned", 0, 0)
|
BurnAnimation.AnimationPlaySound("Battle\Effects\Burned", 0, 0)
|
||||||
BurnAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
|
|
||||||
BurnAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
|
Dim FlameEntity As Entity = BurnAnimation.SpawnEntity(New Vector3(CSng(BattleScreen.OppPokemonNPC.Position.X - 0.25), CSng(BattleScreen.OwnPokemonNPC.Position.Y - 0.25), CSng(BattleScreen.OwnPokemonNPC.Position.Z - 0.25)), TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 0, 32, 32)), New Vector3(0.5, 0.5, 0.5), 1.0F)
|
||||||
BurnAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
|
BurnAnimation.AnimationChangeTexture(FlameEntity, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32)), 2, 1)
|
||||||
BurnAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,96,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 4, 1)
|
BurnAnimation.AnimationChangeTexture(FlameEntity, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32)), 3, 1)
|
||||||
BurnAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,128,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 5, 1)
|
BurnAnimation.AnimationChangeTexture(FlameEntity, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32)), 4, 1)
|
||||||
|
BurnAnimation.AnimationChangeTexture(FlameEntity, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32)), 5, 1)
|
||||||
|
BurnAnimation.AnimationFadeEntity(FlameEntity, 1, False, 0.0F, 6, 1, 1)
|
||||||
BattleScreen.BattleQuery.Add(BurnAnimation)
|
BattleScreen.BattleQuery.Add(BurnAnimation)
|
||||||
|
|
||||||
|
If FlameEntity.Opacity = 0.0F Then
|
||||||
|
BurnAnimation.RemoveEntity(FlameEntity)
|
||||||
|
End If
|
||||||
|
|
||||||
'Actual damage
|
'Actual damage
|
||||||
ReduceHP(reduceAmount, False, False, BattleScreen, .OppPokemon.GetDisplayName() & " is hurt by the burn.", "burn")
|
ReduceHP(reduceAmount, False, False, BattleScreen, .OppPokemon.GetDisplayName() & " is hurt by the burn.", "burn")
|
||||||
End If
|
End If
|
||||||
@ -6796,8 +6816,8 @@
|
|||||||
Loop While SmokeReturned <= 38
|
Loop While SmokeReturned <= 38
|
||||||
|
|
||||||
' Pokemon disappears
|
' Pokemon disappears
|
||||||
BallReturn.AnimationFadePokemonEntity(1, False, 0, 1, 0)
|
BallReturn.AnimationFadeEntity(Nothing, 1, False, 0, 1, 0)
|
||||||
BallReturn.AnimationMovePokemonEntity(0, 0.5, 0, 0.5, False, False, 2, 0,,, 4)
|
BallReturn.AnimationMoveEntity(Nothing, 0, 0.5, 0, 0.5, False, False, 2, 0,,, 3)
|
||||||
|
|
||||||
' Ball returns
|
' Ball returns
|
||||||
BallReturn.AnimationPlaySound("Battle\Pokeball\Throw", 1, 0)
|
BallReturn.AnimationPlaySound("Battle\Pokeball\Throw", 1, 0)
|
||||||
@ -6859,11 +6879,11 @@
|
|||||||
Loop While SmokeSpawned <= 38
|
Loop While SmokeSpawned <= 38
|
||||||
|
|
||||||
' Pokemon appears
|
' Pokemon appears
|
||||||
BallThrow.AnimationFadePokemonEntity(1, True, 1, 4, 0)
|
BallThrow.AnimationFadeEntity(Nothing, 1, True, 1, 4, 0)
|
||||||
BallThrow.AnimationPlaySound(CStr(BattleScreen.OwnPokemon.Number), 4, 0,, True)
|
BallThrow.AnimationPlaySound(CStr(BattleScreen.OwnPokemon.Number), 4, 0,, True)
|
||||||
|
|
||||||
' Pokémon falls down
|
' Pokémon falls down
|
||||||
BallThrow.AnimationMovePokemonEntity(0, 0, 0, 0.05F, False, False, 4, 0,,, 4)
|
BallThrow.AnimationMoveEntity(Nothing, 0, 0, 0, 0.05F, False, False, 4, 0,,, 3)
|
||||||
|
|
||||||
BattleScreen.AddToQuery(InsertIndex, BallThrow)
|
BattleScreen.AddToQuery(InsertIndex, BallThrow)
|
||||||
End If
|
End If
|
||||||
@ -7112,7 +7132,7 @@
|
|||||||
ChangeCameraAngle(1, False, BattleScreen)
|
ChangeCameraAngle(1, False, BattleScreen)
|
||||||
Dim Faint As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, True, BattleScreen.OppPokemonModel)
|
Dim Faint As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, True, BattleScreen.OppPokemonModel)
|
||||||
Faint.AnimationPlaySound(CStr(BattleScreen.OppPokemon.Number), 0, 2, False, True)
|
Faint.AnimationPlaySound(CStr(BattleScreen.OppPokemon.Number), 0, 2, False, True)
|
||||||
Faint.AnimationMovePokemonEntity(0, -1, 0, 0.1, False, False, 2, 0,,, 4)
|
Faint.AnimationMoveEntity(Nothing, 0, -1, 0, 0.1, False, False, 2, 0,,, 3)
|
||||||
BattleScreen.BattleQuery.Add(Faint)
|
BattleScreen.BattleQuery.Add(Faint)
|
||||||
|
|
||||||
BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OppPokemon, 2, -1, -1, -1, -1))
|
BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OppPokemon, 2, -1, -1, -1, -1))
|
||||||
@ -7157,8 +7177,8 @@
|
|||||||
Loop While SmokeReturned <= 38
|
Loop While SmokeReturned <= 38
|
||||||
|
|
||||||
' Pokemon disappears
|
' Pokemon disappears
|
||||||
BallReturn.AnimationFadePokemonEntity(1, False, 0, 1, 0)
|
BallReturn.AnimationFadeEntity(Nothing, 1, False, 0, 1, 0)
|
||||||
BallReturn.AnimationMovePokemonEntity(0, 0.5, 0, 0.5, False, False, 2, 0,,, 4)
|
BallReturn.AnimationMoveEntity(Nothing, 0, 0.5, 0, 0.5, False, False, 2, 0,,, 4)
|
||||||
|
|
||||||
' Ball returns
|
' Ball returns
|
||||||
BallReturn.AnimationPlaySound("Battle\Pokeball\Throw", 1, 0)
|
BallReturn.AnimationPlaySound("Battle\Pokeball\Throw", 1, 0)
|
||||||
@ -7218,8 +7238,8 @@
|
|||||||
Loop While SmokeReturned <= 38
|
Loop While SmokeReturned <= 38
|
||||||
|
|
||||||
' Pokemon disappears
|
' Pokemon disappears
|
||||||
BallReturn.AnimationFadePokemonEntity(1, False, 0, 1, 0)
|
BallReturn.AnimationFadeEntity(Nothing, 1, False, 0, 1, 0)
|
||||||
BallReturn.AnimationMovePokemonEntity(0, 0.5, 0, 0.5, False, False, 2, 0,,, 4)
|
BallReturn.AnimationMoveEntity(Nothing, 0, 0.5, 0, 0.5, False, False, 2, 0,,, 4)
|
||||||
|
|
||||||
' Ball returns
|
' Ball returns
|
||||||
BallReturn.AnimationPlaySound("Battle\Pokeball\Throw", 1, 0)
|
BallReturn.AnimationPlaySound("Battle\Pokeball\Throw", 1, 0)
|
||||||
@ -7273,11 +7293,11 @@
|
|||||||
Loop While SmokeSpawned <= 38
|
Loop While SmokeSpawned <= 38
|
||||||
|
|
||||||
' Pokemon appears
|
' Pokemon appears
|
||||||
BallThrow.AnimationFadePokemonEntity(1, True, 1, 4, 0)
|
BallThrow.AnimationFadeEntity(Nothing, 1, True, 1, 4, 0)
|
||||||
BallThrow.AnimationPlaySound(CStr(BattleScreen.OppPokemon.Number), 4, 0,, True)
|
BallThrow.AnimationPlaySound(CStr(BattleScreen.OppPokemon.Number), 4, 0,, True)
|
||||||
|
|
||||||
' Pokémon falls down
|
' Pokémon falls down
|
||||||
BallThrow.AnimationMovePokemonEntity(0, 0, 0, 0.05F, False, False, 4, 0,,, 4)
|
BallThrow.AnimationMoveEntity(Nothing, 0, 0, 0, 0.05F, False, False, 4, 0,,, 4)
|
||||||
|
|
||||||
BattleScreen.BattleQuery.Add(BallThrow)
|
BattleScreen.BattleQuery.Add(BallThrow)
|
||||||
End If
|
End If
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
Public AnimationEnded As Boolean = False
|
Public AnimationEnded As Boolean = False
|
||||||
Public BAFlipped As Boolean
|
Public BAFlipped As Boolean
|
||||||
Public AnimationSequence As List(Of BattleAnimation3D)
|
Public AnimationSequence As List(Of BattleAnimation3D)
|
||||||
|
Public SpawnedEntities As List(Of Entity)
|
||||||
Public CurrentEntity As Entity
|
Public CurrentEntity As Entity
|
||||||
Public CurrentModel As ModelEntity
|
Public CurrentModel As ModelEntity
|
||||||
|
|
||||||
@ -16,7 +17,7 @@
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Sub New(ByVal entity As NPC, ByVal BAFlipped As Boolean, Optional ByVal model As ModelEntity = Nothing)
|
Public Sub New(ByVal entity As Entity, ByVal BAFlipped As Boolean, Optional ByVal model As ModelEntity = Nothing)
|
||||||
MyBase.New(QueryTypes.MoveAnimation)
|
MyBase.New(QueryTypes.MoveAnimation)
|
||||||
Me.AnimationSequence = New List(Of BattleAnimation3D)
|
Me.AnimationSequence = New List(Of BattleAnimation3D)
|
||||||
Me.BAFlipped = BAFlipped
|
Me.BAFlipped = BAFlipped
|
||||||
@ -54,20 +55,18 @@
|
|||||||
If AnimationSequence.Count <= 0 Then
|
If AnimationSequence.Count <= 0 Then
|
||||||
AnimationSequenceEnd()
|
AnimationSequenceEnd()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
For Each Animation As BattleAnimation3D In AnimationSequence
|
For Each Animation As BattleAnimation3D In AnimationSequence
|
||||||
Animation.UpdateEntity()
|
Animation.UpdateEntity()
|
||||||
Next
|
Next
|
||||||
|
For Each Entity As Entity In SpawnedEntities
|
||||||
|
Entity.UpdateEntity()
|
||||||
|
Next
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub AnimationSequenceBegin()
|
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
|
AnimationStarted = True
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub AnimationSequenceEnd()
|
Public Sub AnimationSequenceEnd()
|
||||||
@ -80,6 +79,104 @@
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Function SpawnEntity(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal Opacity As Single) As Entity
|
||||||
|
Dim SpawnedEntity As Entity = New Entity(Position.X, Position.Y, Position.Z, "BattleAnimation", {Texture}, {0, 0}, False, 0, Scale, BaseModel.BillModel, 0, "", New Vector3(1.0F))
|
||||||
|
|
||||||
|
SpawnedEntity.Opacity = Opacity
|
||||||
|
If SpawnedEntity.Opacity > 0 Then
|
||||||
|
SpawnedEntity.Visible = True
|
||||||
|
Else
|
||||||
|
SpawnedEntity.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
SpawnedEntities.Add(SpawnedEntity)
|
||||||
|
Return SpawnedEntity
|
||||||
|
End Function
|
||||||
|
Public Sub RemoveEntity(Entity As Entity)
|
||||||
|
SpawnedEntities.Remove(Entity)
|
||||||
|
End Sub
|
||||||
|
Public Sub AnimationChangeTexture(ByVal Entity As Entity, ByVal Texture As Texture2D, ByVal startDelay As Single, ByVal endDelay As Single)
|
||||||
|
Dim TextureChangeEntity As Entity
|
||||||
|
|
||||||
|
If Entity Is Nothing Then
|
||||||
|
TextureChangeEntity = CurrentEntity
|
||||||
|
Else
|
||||||
|
TextureChangeEntity = Entity
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim baEntityTextureChange As BAEntityTextureChange = New BAEntityTextureChange(TextureChangeEntity, Texture, startDelay, endDelay)
|
||||||
|
AnimationSequence.Add(baEntityTextureChange)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub AnimationMoveEntity(ByVal Entity As Entity, 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)
|
||||||
|
Dim MoveEntity As Entity
|
||||||
|
Dim Destination As Vector3
|
||||||
|
|
||||||
|
If Entity Is Nothing Then
|
||||||
|
MoveEntity = CurrentEntity
|
||||||
|
If BAFlipped Then
|
||||||
|
DestinationX -= DestinationX * 2.0F
|
||||||
|
DestinationZ -= DestinationZ * 2.0F
|
||||||
|
Destination = New Vector3(CurrentEntity.Position.X + DestinationX, CurrentEntity.Position.Y + DestinationY, CurrentEntity.Position.Z + DestinationZ)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
MoveEntity = Entity
|
||||||
|
Destination = New Vector3(DestinationX, DestinationY, DestinationZ)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim baEntityMove As BAEntityMove = New BAEntityMove(MoveEntity, Destination, Speed, SpinX, SpinZ, startDelay, endDelay, SpinXSpeed, SpinZSpeed, MovementCurve)
|
||||||
|
AnimationSequence.Add(baEntityMove)
|
||||||
|
|
||||||
|
If Me.CurrentModel IsNot Nothing Then
|
||||||
|
Dim baModelMove As BAEntityMove = New BAEntityMove(CType(CurrentModel, Entity), Destination, Speed, SpinX, SpinZ, startDelay, endDelay, SpinXSpeed, SpinZSpeed, MovementCurve)
|
||||||
|
AnimationSequence.Add(baModelMove)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub AnimationFadeEntity(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)
|
||||||
|
Dim FadeEntity As Entity
|
||||||
|
If Entity Is Nothing Then
|
||||||
|
FadeEntity = CurrentEntity
|
||||||
|
Else
|
||||||
|
FadeEntity = Entity
|
||||||
|
End If
|
||||||
|
If startState = -1.0F Then startState = FadeEntity.Opacity
|
||||||
|
Dim baEntityOpacity As BAEntityOpacity = New BAEntityOpacity(FadeEntity, TransitionSpeed, FadeIn, EndState, startDelay, endDelay, startState)
|
||||||
|
AnimationSequence.Add(baEntityOpacity)
|
||||||
|
|
||||||
|
If Me.CurrentModel IsNot Nothing Then
|
||||||
|
Dim baModelOpacity As BAEntityOpacity = New BAEntityOpacity(CType(CurrentModel, Entity), TransitionSpeed, FadeIn, EndState, startDelay, endDelay, startState)
|
||||||
|
AnimationSequence.Add(baModelOpacity)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Public Sub AnimationRotateEntity(Entity As Entity, ByVal RotationSpeedX As Single, ByVal RotationSpeedY As Single, ByVal RotationSpeedZ As Single, ByVal EndRotationX As Single, ByVal EndRotationY As Single, ByVal EndRotationZ As Single, ByVal startDelay As Single, ByVal endDelay As Single, ByVal DoXRotation As Boolean, ByVal DoYRotation As Boolean, ByVal DoZRotation As Boolean, ByVal DoReturn As Boolean)
|
||||||
|
Dim RotateEntity As Entity
|
||||||
|
If Entity Is Nothing Then
|
||||||
|
RotateEntity = CurrentEntity
|
||||||
|
Else
|
||||||
|
RotateEntity = Entity
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim RotationSpeedVector As Vector3 = New Vector3(RotationSpeedX, RotationSpeedY, RotationSpeedZ)
|
||||||
|
Dim EndRotation As Vector3 = New Vector3(EndRotationX, EndRotationY, EndRotationZ)
|
||||||
|
Dim baEntityRotate As BAEntityRotate = New BAEntityRotate(RotateEntity, RotationSpeedVector, EndRotation, startDelay, endDelay, DoXRotation, DoYRotation, DoZRotation, DoReturn)
|
||||||
|
AnimationSequence.Add(baEntityRotate)
|
||||||
|
End Sub
|
||||||
|
Public Sub AnimationScaleEntity(ByVal Entity As Entity, 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")
|
||||||
|
Dim ScaleEntity As Entity
|
||||||
|
If Entity Is Nothing Then
|
||||||
|
ScaleEntity = CurrentEntity
|
||||||
|
Else
|
||||||
|
ScaleEntity = Entity
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim Position As Vector3 = ScaleEntity.Position
|
||||||
|
Dim Scale As Vector3 = ScaleEntity.Scale
|
||||||
|
Dim EndSize As Vector3 = New Vector3(EndSizeX, EndSizeY, EndSizeZ)
|
||||||
|
Dim baBillSize As BAEntityScale = New BAEntityScale(ScaleEntity, Scale, Grow, EndSize, SizeSpeed, startDelay, endDelay, Anchors)
|
||||||
|
AnimationSequence.Add(baBillSize)
|
||||||
|
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)
|
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
|
If CurrentEntity Is Nothing Then
|
||||||
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation OUTSIDE OF ATTACK ANIMATION DELEGATE")
|
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation OUTSIDE OF ATTACK ANIMATION DELEGATE")
|
||||||
@ -142,44 +239,6 @@
|
|||||||
AnimationSequence.Add(baMove)
|
AnimationSequence.Add(baMove)
|
||||||
End If
|
End If
|
||||||
End Sub
|
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)
|
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
|
If CurrentEntity Is Nothing Then
|
||||||
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AnimationPlaySound OUTSIDE OF ATTACK ANIMATION DELEGATE")
|
Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AnimationPlaySound OUTSIDE OF ATTACK ANIMATION DELEGATE")
|
||||||
@ -191,52 +250,5 @@
|
|||||||
End If
|
End If
|
||||||
End Sub
|
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 Class
|
||||||
End Namespace
|
End Namespace
|
Before Width: | Height: | Size: 303 B After Width: | Height: | Size: 303 B |
@ -15394,7 +15394,7 @@
|
|||||||
<Content Include="Content\Textures\Battle\Normal\Tackle.png">
|
<Content Include="Content\Textures\Battle\Normal\Tackle.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="Content\Textures\Battle\Other\Star.png">
|
<Content Include="Content\Textures\Battle\BallCatchStar.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="Content\Textures\Battle\Poison\Bubble.png">
|
<Content Include="Content\Textures\Battle\Poison\Bubble.png">
|
||||||
@ -27545,9 +27545,11 @@
|
|||||||
<Content Include="credits.txt">
|
<Content Include="credits.txt">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Compile Include="Battle\BattleAnimations\BABillMove.vb" />
|
<Compile Include="Battle\BattleAnimations\BAEntityRotate.vb" />
|
||||||
<Compile Include="Battle\BattleAnimations\BABillOpacity.vb" />
|
<Compile Include="Battle\BattleAnimations\BAEntityMove.vb" />
|
||||||
<Compile Include="Battle\BattleAnimations\BABillSize.vb" />
|
<Compile Include="Battle\BattleAnimations\BAEntityOpacity.vb" />
|
||||||
|
<Compile Include="Battle\BattleAnimations\BAEntityTextureChange.vb" />
|
||||||
|
<Compile Include="Battle\BattleAnimations\BAEntityScale.vb" />
|
||||||
<Compile Include="Battle\BattleAnimations\BASound.vb" />
|
<Compile Include="Battle\BattleAnimations\BASound.vb" />
|
||||||
<Compile Include="Battle\BattleSystemV2\QueryObjects\AnimationQueryObject.vb" />
|
<Compile Include="Battle\BattleSystemV2\QueryObjects\AnimationQueryObject.vb" />
|
||||||
<Compile Include="Dialogues\ImageView.vb" />
|
<Compile Include="Dialogues\ImageView.vb" />
|
||||||
@ -29229,7 +29231,6 @@
|
|||||||
<Compile Include="Battle\BattleAnimations\BAMove.vb" />
|
<Compile Include="Battle\BattleAnimations\BAMove.vb" />
|
||||||
<Compile Include="Battle\BattleAnimations\BAOpacity.vb" />
|
<Compile Include="Battle\BattleAnimations\BAOpacity.vb" />
|
||||||
<Compile Include="Battle\BattleAnimations\BARotation.vb" />
|
<Compile Include="Battle\BattleAnimations\BARotation.vb" />
|
||||||
<Compile Include="Battle\BattleAnimations\BASize.vb" />
|
|
||||||
<Compile Include="Battle\BattleAnimations\BattleAnimation3D.vb" />
|
<Compile Include="Battle\BattleAnimations\BattleAnimation3D.vb" />
|
||||||
<Compile Include="Battle\BattleStats.vb" />
|
<Compile Include="Battle\BattleStats.vb" />
|
||||||
<Compile Include="Battle\BattleSystemV2\Battle.vb" />
|
<Compile Include="Battle\BattleSystemV2\Battle.vb" />
|
||||||
|
@ -54,8 +54,8 @@
|
|||||||
|
|
||||||
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
|
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
|
||||||
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, own, CurrentModel)
|
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, own, CurrentModel)
|
||||||
MoveAnimation.AnimationMovePokemonEntity(0.5, 0, 0, 0.3, False, False, 0, 0,,, 2)
|
MoveAnimation.AnimationMoveEntity(Nothing, 0.5, 0, 0, 0.3, False, False, 0, 0,,, 2)
|
||||||
MoveAnimation.AnimationMovePokemonEntity(0, 0, 0, 0.3, False, False, 1, 0,,, 2)
|
MoveAnimation.AnimationMoveEntity(Nothing, 0, 0, 0, 0.3, False, False, 1, 0,,, 2)
|
||||||
BattleScreen.BattleQuery.Add(MoveAnimation)
|
BattleScreen.BattleQuery.Add(MoveAnimation)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
@ -3,10 +3,13 @@
|
|||||||
Inherits Screen
|
Inherits Screen
|
||||||
|
|
||||||
Dim Ball As Item
|
Dim Ball As Item
|
||||||
Dim Animations As New List(Of BattleAnimation3D)
|
|
||||||
|
Dim Animations As BattleSystem.AnimationQueryObject = New BattleSystem.AnimationQueryObject(Nothing, False, Nothing)
|
||||||
|
Dim BallStartPosition As Vector3 = New Vector3(Camera.Position.X - 1.0F, Camera.Position.Y, Camera.Position.Z - 0.5F) + BattleScreen.BattleMapOffset
|
||||||
|
Dim BallEntity As Entity = Animations.SpawnEntity(BallStartPosition, Ball.Texture, New Vector3(0.3F), 1.0F)
|
||||||
|
|
||||||
Dim AnimationStarted As Boolean = False
|
Dim AnimationStarted As Boolean = False
|
||||||
Dim catched As Boolean = False
|
Dim caught As Boolean = False
|
||||||
Dim InBall As Boolean = False
|
Dim InBall As Boolean = False
|
||||||
Dim AnimationIndex As Integer = 0
|
Dim AnimationIndex As Integer = 0
|
||||||
Dim renamed As Boolean = False
|
Dim renamed As Boolean = False
|
||||||
@ -49,9 +52,6 @@
|
|||||||
Level.Draw()
|
Level.Draw()
|
||||||
|
|
||||||
Dim RenderObjects As New List(Of Entity)
|
Dim RenderObjects As New List(Of Entity)
|
||||||
For Each a As BattleAnimation3D In Me.Animations
|
|
||||||
RenderObjects.Add(a)
|
|
||||||
Next
|
|
||||||
|
|
||||||
If InBall = False Then
|
If InBall = False Then
|
||||||
RenderObjects.Add(BattleScreen.OppPokemonNPC)
|
RenderObjects.Add(BattleScreen.OppPokemonNPC)
|
||||||
@ -65,29 +65,15 @@
|
|||||||
[Object].Render()
|
[Object].Render()
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
Animations.Draw(CType(Me.PreScreen, BattleSystem.BattleScreen))
|
||||||
|
|
||||||
World.DrawWeather(Screen.Level.World.CurrentMapWeather)
|
World.DrawWeather(Screen.Level.World.CurrentMapWeather)
|
||||||
|
|
||||||
TextBox.Draw()
|
TextBox.Draw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub UpdateAnimations()
|
Private Sub UpdateAnimations()
|
||||||
Animations = (From a In Animations Order By a.CameraDistance Descending).ToList()
|
Animations.Update(CType(Me.PreScreen, BattleSystem.BattleScreen))
|
||||||
|
|
||||||
For i = 0 To Animations.Count - 1
|
|
||||||
If i <= Animations.Count - 1 Then
|
|
||||||
Dim a As BattleAnimation3D = Animations(i)
|
|
||||||
If a.CanRemove = True Then
|
|
||||||
i -= 1
|
|
||||||
Animations.Remove(a)
|
|
||||||
Else
|
|
||||||
a.Update()
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
For Each Animation As BattleAnimation3D In Animations
|
|
||||||
Animation.UpdateEntity()
|
|
||||||
Next
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SetCamera()
|
Private Sub SetCamera()
|
||||||
@ -129,7 +115,6 @@
|
|||||||
If AnimationStarted = False Then
|
If AnimationStarted = False Then
|
||||||
SetupAnimation()
|
SetupAnimation()
|
||||||
Else
|
Else
|
||||||
If Me.Animations.Count = 0 Then
|
|
||||||
Select Case Me.AnimationIndex
|
Select Case Me.AnimationIndex
|
||||||
Case 0
|
Case 0
|
||||||
SoundManager.PlaySound("Battle\Pokeball\open")
|
SoundManager.PlaySound("Battle\Pokeball\open")
|
||||||
@ -146,7 +131,7 @@
|
|||||||
SoundManager.PlaySound("Battle\Pokeball\shake")
|
SoundManager.PlaySound("Battle\Pokeball\shake")
|
||||||
AnimationIndex += 1
|
AnimationIndex += 1
|
||||||
Else
|
Else
|
||||||
SoundManager.PlaySound("Battle\Pokeball\break")
|
SoundManager.PlaySound("Battle\Pokeball\open")
|
||||||
AnimationIndex = 21
|
AnimationIndex = 21
|
||||||
InBall = False
|
InBall = False
|
||||||
End If
|
End If
|
||||||
@ -156,7 +141,6 @@
|
|||||||
AnimationIndex = 7
|
AnimationIndex = 7
|
||||||
AnimationStarted = False
|
AnimationStarted = False
|
||||||
SetupAnimation()
|
SetupAnimation()
|
||||||
SoundManager.PlaySound("Battle\Pokeball\catch", False)
|
|
||||||
Case 7
|
Case 7
|
||||||
AnimationIndex = 8
|
AnimationIndex = 8
|
||||||
AnimationStarted = False
|
AnimationStarted = False
|
||||||
@ -200,7 +184,6 @@
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ResetVisibility()
|
Private Sub ResetVisibility()
|
||||||
@ -272,29 +255,51 @@
|
|||||||
|
|
||||||
Select Case Me.AnimationIndex
|
Select Case Me.AnimationIndex
|
||||||
Case 0
|
Case 0
|
||||||
Animations.Add(New BAMove(New Vector3(Camera.Position.X - 1.0F, Camera.Position.Y, Camera.Position.Z - 0.5F) + BattleScreen.BattleMapOffset, Ball.Texture, New Vector3(0.3F), New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z), 0.04F, True, True, 1.0F, 0.0F,,, 3))
|
Animations.AnimationMoveEntity(BallEntity, BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z, 0.04F, True, True, 1.0F, 0.0F,,, 3)
|
||||||
Case 1
|
Case 1
|
||||||
BattleScreen.OppPokemonNPC.Visible = False
|
Dim SmokeReturned As Integer = 0
|
||||||
Animations.Add(New BAMove(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z), 0.01F, False, False, 0.0F, 6.0F,,, 3))
|
Do
|
||||||
|
Dim SmokePosition = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
|
||||||
|
Dim SmokeDestination = New Vector3(0, 0, 0)
|
||||||
|
|
||||||
Dim Size As New BASize(BattleScreen.OppPokemonNPC.Position, BattleScreen.OppPokemonNPC.Textures(0), BattleScreen.OppPokemonNPC.Scale, False, New Vector3(0.05F), 0.02F, 0.0F, 0.0F, "1")
|
Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Cloud")
|
||||||
|
|
||||||
Animations.Add(Size)
|
Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
|
||||||
|
Dim SmokeSpeed = CSng(Random.Next(1, 3) / 10.0F)
|
||||||
|
|
||||||
|
Dim SmokeEntity As Entity = Animations.SpawnEntity(SmokePosition, SmokeTexture, SmokeScale, 1.0F)
|
||||||
|
|
||||||
|
Animations.AnimationMoveEntity(SmokeEntity, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 0.0F, 0.0F)
|
||||||
|
If SmokeEntity.Position = SmokeDestination Then
|
||||||
|
Animations.RemoveEntity(SmokeEntity)
|
||||||
|
End If
|
||||||
|
Threading.Interlocked.Increment(SmokeReturned)
|
||||||
|
Loop While SmokeReturned <= 38
|
||||||
|
|
||||||
|
Animations.AnimationMoveEntity(BallEntity, BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z, 0.01F, False, False, 0.0F, 6.0F,,, 3)
|
||||||
|
|
||||||
|
Animations.AnimationScaleEntity(BattleScreen.OppPokemonNPC, False, 0.05F, 0.05F, 0.05F, 0.02F, 0.0F, 0.0F, "1")
|
||||||
|
Animations.AnimationFadeEntity(BattleScreen.OppPokemonNPC, 1, False, 0.0F, 0.0F, 0.0F)
|
||||||
Case 2
|
Case 2
|
||||||
Animations.Add(New BAMove(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), 0.02F, False, False, 0.0F, 6.0F,,, 3))
|
Animations.AnimationMoveEntity(BallEntity, BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z, 0.02F, False, False, 0.0F, 6.0F,,, 3)
|
||||||
|
|
||||||
Case 3, 5
|
Case 3, 5
|
||||||
Animations.Add(New BARotation(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(0, 0, 0.05F), New Vector3(0, 0, 1.0F), 0.0F, 4.0F, False, False, True, True))
|
Animations.AnimationRotateEntity(BallEntity, 0, 0, 0.05F, 0, 0, 1.0F, 0.0F, 4.0F, False, False, True, True)
|
||||||
Case 4, 6
|
Case 4, 6
|
||||||
Animations.Add(New BARotation(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(0, 0, -0.05F), New Vector3(0, 0, -1.0F), 0.0F, 4.0F, False, False, True, True))
|
Animations.AnimationRotateEntity(BallEntity, 0, 0, -0.05F, 0, 0, -1.0F, 0.0F, 4.0F, False, False, True, True)
|
||||||
Case 7 ' Catch Animation
|
Case 7 ' Catch Animation
|
||||||
For i = 0 To 2
|
For i = 0 To 2
|
||||||
Dim v As Vector3 = New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z)
|
Dim StarPosition As Vector3 = New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z)
|
||||||
|
Dim StarDestination As Vector3 = New Vector3(StarPosition.X, StarPosition.Y + 0.4F, StarPosition.Z - ((1 - i) * 0.4F))
|
||||||
Animations.Add(New BAMove(v, TextureManager.GetTexture("Textures\Battle\Other\Star"), New Vector3(0.1F), New Vector3(v.X, v.Y + 0.4F, v.Z - ((1 - i) * 0.4F)), 0.01F, False, False, 0.0F, 0.0F,,, 3))
|
Dim StarEntity As Entity = Animations.SpawnEntity(StarPosition, TextureManager.GetTexture("Textures\Battle\BallCatchStar"), New Vector3(0.1F), 1.0F)
|
||||||
|
Animations.AnimationMoveEntity(StarEntity, StarDestination.X, StarDestination.Y, StarDestination.Z, 0.01F, False, False, 0.0F, 0.0F,,, 3)
|
||||||
|
If StarEntity.Position = StarDestination Then
|
||||||
|
Animations.RemoveEntity(StarEntity)
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
Animations.Add(New BAMove(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), 0.02F, False, False, 0.0F, 6.0F,,, 3))
|
Animations.AnimationMoveEntity(BallEntity, BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z, 0.02F, False, False, 0.0F, 6.0F,,, 3)
|
||||||
Case 8
|
Case 8
|
||||||
Animations.Add(New BAOpacity(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), 0.01F, False, 0.0F, 0.0F, 0.0F))
|
Animations.AnimationFadeEntity(BallEntity, 0.01F, False, 0.0F, 0.0F, 0.0F)
|
||||||
Case 21 ' Break Animation
|
Case 21 ' Break Animation
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
Loading…
x
Reference in New Issue
Block a user