Most of the animations work again

This commit is contained in:
JappaWakka 2022-04-25 18:44:05 +02:00
parent 398574c1ab
commit 24a6b77a1c
6 changed files with 43 additions and 60 deletions

View File

@ -90,10 +90,6 @@
End If End If
End If End If
End If End If
If VectorReached() = True Then
RotationReady()
End If
Else Else
RotationReady() RotationReady()
End If End If

View File

@ -508,7 +508,7 @@
Me.ChangeCameraAngle(1, own, BattleScreen) Me.ChangeCameraAngle(1, own, BattleScreen)
'***Mega Evolution Animation*** '***Mega Evolution Animation***
If Core.Player.ShowBattleAnimations <> 0 Then If Core.Player.ShowBattleAnimations <> 0 Then
Dim MegaAnimation As AnimationQueryObject = New AnimationQueryObject(Nothing, Not own) Dim MegaAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, Not own)
MegaAnimation.AnimationPlaySound("Battle\Effects\MegaEvolution", 0, 0) MegaAnimation.AnimationPlaySound("Battle\Effects\MegaEvolution", 0, 0)
Dim maxAmount As Integer = 16 Dim maxAmount As Integer = 16
@ -522,16 +522,16 @@
Dim Scale As New Vector3(0.5F) Dim Scale As New Vector3(0.5F)
Dim startDelay As Double = 5.0 * Random.NextDouble() Dim startDelay As Double = 5.0 * Random.NextDouble()
Dim Phase1Entity As Entity = MegaAnimation.SpawnEntity(pNPC.Position + Position, Texture, Scale, 1.0F, CSng(startDelay)) Dim Phase1Entity As Entity = MegaAnimation.SpawnEntity(Position, Texture, Scale, 1.0F, CSng(startDelay))
Dim Destination As New Vector3(CSng(pNPC.Position.X - Phase1Entity.Position.X), -0.8, CSng(pNPC.Position.Z - Phase1Entity.Position.Z)) Dim Destination As New Vector3(0, 0, 0)
MegaAnimation.AnimationMove(Phase1Entity, True, Destination.X, Destination.Y, Destination.Z, 0.05F, False, True, CSng(startDelay), 0.0F) MegaAnimation.AnimationMove(Phase1Entity, True, 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
Dim Phase2Entity As Entity = MegaAnimation.SpawnEntity(pNPC.Position, TextureManager.GetTexture("Textures\Battle\MegaEvolution\Mega_Phase2"), New Vector3(0.0F), 1.0F, 4.0F, 0.0F) Dim Phase2Entity As Entity = MegaAnimation.SpawnEntity(New Vector3(0), TextureManager.GetTexture("Textures\Battle\MegaEvolution\Mega_Phase2"), New Vector3(0.0F), 1.0F, 4.0F, 0.0F)
MegaAnimation.AnimationRotate(Phase2Entity, False, 0, 0, 0.1F, 0, 0, 10.0F, 4, 0F, False, False, True, False)
MegaAnimation.AnimationScale(Phase2Entity, False, True, 1.25F, 1.25F, 1.25F, 0.02F, 4.0F, 0.0F) MegaAnimation.AnimationScale(Phase2Entity, False, True, 1.25F, 1.25F, 1.25F, 0.02F, 4.0F, 0.0F)
MegaAnimation.AnimationRotate(Phase2Entity, True, 0, 0, 0.1F, 0, 0, 10.0F, 4, 0F, False, False, True, False)
BattleScreen.BattleQuery.Add(MegaAnimation) BattleScreen.BattleQuery.Add(MegaAnimation)
Else Else
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\MegaEvolution", False)) BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\MegaEvolution", False))
@ -1300,7 +1300,7 @@
SleepAnimation.AnimationChangeTexture(SleepEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 16, 16, 16), ""), 1, 1) SleepAnimation.AnimationChangeTexture(SleepEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 16, 16, 16), ""), 1, 1)
SleepAnimation.AnimationMove(SleepEntity1, True, 0, 0.5, 0.25, 0.01, False, False, 0, 0) SleepAnimation.AnimationMove(SleepEntity1, True, 0, 0.5, 0.25, 0.01, False, False, 0, 0)
Dim SleepEntity2 As Entity = SleepAnimation.SpawnEntity(New Vector3(0.25, 0.25, 0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.5F), 1, 1.5, 1) Dim SleepEntity2 As Entity = SleepAnimation.SpawnEntity(New Vector3(0, 0.25, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.5F), 1, 1.5, 1)
SleepAnimation.AnimationChangeTexture(SleepEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 16, 16, 16), ""), 2.5, 1) SleepAnimation.AnimationChangeTexture(SleepEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 16, 16, 16), ""), 2.5, 1)
SleepAnimation.AnimationMove(SleepEntity2, True, 0, 0.5, 0.25, 0.01, False, False, 2, 0) SleepAnimation.AnimationMove(SleepEntity2, True, 0, 0.5, 0.25, 0.01, False, False, 2, 0)
@ -3309,7 +3309,7 @@
SleepAnimation.AnimationChangeTexture(SleepEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 16, 16, 16), ""), 1, 1) SleepAnimation.AnimationChangeTexture(SleepEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 16, 16, 16), ""), 1, 1)
SleepAnimation.AnimationMove(SleepEntity1, True, 0, 0.5, 0.25, 0.01, False, False, 0, 0) SleepAnimation.AnimationMove(SleepEntity1, True, 0, 0.5, 0.25, 0.01, False, False, 0, 0)
Dim SleepEntity2 As Entity = SleepAnimation.SpawnEntity(New Vector3(0.25, 0.25, 0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.5F), 1, 1.5, 1) Dim SleepEntity2 As Entity = SleepAnimation.SpawnEntity(New Vector3(0, 0.25, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.5F), 1, 1.5, 1)
SleepAnimation.AnimationChangeTexture(SleepEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 16, 16, 16), ""), 2.5, 1) SleepAnimation.AnimationChangeTexture(SleepEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 16, 16, 16), ""), 2.5, 1)
SleepAnimation.AnimationMove(SleepEntity2, True, 0, 0.5, 0.25, 0.01, False, False, 2, 0) SleepAnimation.AnimationMove(SleepEntity2, True, 0, 0.5, 0.25, 0.01, False, False, 2, 0)
@ -3906,11 +3906,9 @@
Dim p As Pokemon = BattleScreen.OwnPokemon Dim p As Pokemon = BattleScreen.OwnPokemon
Dim op As Pokemon = BattleScreen.OppPokemon Dim op As Pokemon = BattleScreen.OppPokemon
Dim pNPC As NPC = BattleScreen.OwnPokemonNPC Dim pNPC As NPC = BattleScreen.OwnPokemonNPC
If own = False Then
pNPC = BattleScreen.OppPokemonNPC
End If
If own = False Then If own = False Then
p = BattleScreen.OppPokemon p = BattleScreen.OppPokemon
pNPC = BattleScreen.OppPokemonNPC
op = BattleScreen.OwnPokemon op = BattleScreen.OwnPokemon
End If End If

View File

@ -23,9 +23,7 @@
Me.AnimationSequence = New List(Of BattleAnimation3D) Me.AnimationSequence = New List(Of BattleAnimation3D)
Me.SpawnedEntities = New List(Of Entity) Me.SpawnedEntities = New List(Of Entity)
Me.DrawBeforeEntities = DrawBeforeEntities Me.DrawBeforeEntities = DrawBeforeEntities
If BattleFlipped <> Nothing Then Me.BattleFlipped = BattleFlipped
Me.BattleFlipped = BattleFlipped
End If
If entity IsNot Nothing Then If entity IsNot Nothing Then
Me.CurrentEntity = entity Me.CurrentEntity = entity
End If End If
@ -41,8 +39,6 @@
For Each a As BattleAnimation3D In Me.AnimationSequence For Each a As BattleAnimation3D In Me.AnimationSequence
If a.AnimationType = BattleAnimation3D.AnimationTypes.Background Then If a.AnimationType = BattleAnimation3D.AnimationTypes.Background Then
Backgrounds.Add(a) Backgrounds.Add(a)
Else
RenderObjects.Add(a)
End If End If
Next Next
For Each entity As BattleAnimation3D In Me.SpawnedEntities For Each entity As BattleAnimation3D In Me.SpawnedEntities
@ -107,24 +103,22 @@
Public Function SpawnEntity(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal Opacity As Single, Optional ByVal startDelay As Single = 0.0F, Optional ByVal endDelay As Single = 0.0F) As Entity Public Function SpawnEntity(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal Opacity As Single, Optional ByVal startDelay As Single = 0.0F, Optional ByVal endDelay As Single = 0.0F) As Entity
Dim NewPosition As Vector3 Dim NewPosition As Vector3
If Not Position = Nothing Then If Not Position = Nothing Then
If BattleFlipped <> Nothing Then If BattleFlipped = True Then
If BattleFlipped = True Then If CurrentEntity IsNot Nothing Then
If CurrentEntity IsNot Nothing Then NewPosition.X = CurrentEntity.Position.X - Position.X
NewPosition.X = CurrentEntity.Position.X - Position.X NewPosition.Y = CurrentEntity.Position.Y + Position.Y
NewPosition.Y = CurrentEntity.Position.Y + Position.Y NewPosition.Z = CurrentEntity.Position.Z - Position.Z
NewPosition.Z = CurrentEntity.Position.Z + Position.Z
Else
NewPosition = Position
End If
Else Else
If CurrentEntity IsNot Nothing Then NewPosition = Position
NewPosition = CurrentEntity.Position + Position
Else
NewPosition = Position
End If
End If End If
Else Else
NewPosition = Position If CurrentEntity IsNot Nothing Then
NewPosition.X = CurrentEntity.Position.X + Position.X
NewPosition.Y = CurrentEntity.Position.Y + Position.Y
NewPosition.Z = CurrentEntity.Position.Z + Position.Z
Else
NewPosition = Position
End If
End If End If
Else Else
If CurrentEntity IsNot Nothing Then If CurrentEntity IsNot Nothing Then
@ -179,7 +173,7 @@
End If End If
End If End If
If CurrentEntity Is Nothing Then If CurrentEntity Is Nothing Then
Destination = New Vector3(DestinationX, DestinationY, DestinationZ) Destination = MoveEntity.Position + New Vector3(DestinationX, DestinationY, DestinationZ)
Else Else
Destination = CurrentEntity.Position + New Vector3(DestinationX, DestinationY, DestinationZ) Destination = CurrentEntity.Position + New Vector3(DestinationX, DestinationY, DestinationZ)
End If End If

View File

@ -65,16 +65,10 @@
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity) Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
Dim MoveAnimation = New AnimationQueryObject(CurrentEntity, BattleFlip) Dim MoveAnimation = New AnimationQueryObject(CurrentEntity, BattleFlip)
Dim FireballEntity = MoveAnimation.SpawnEntity(Nothing, TextureManager.GetTexture("Textures\Battle\Fire\FireBall"), New Vector3(0.5F), 1.0F) Dim FireballEntity = MoveAnimation.SpawnEntity(New Vector3(0), TextureManager.GetTexture("Textures\Battle\Fire\FireBall"), New Vector3(0.5F), 1.0F)
MoveAnimation.AnimationMove(FireballEntity, True, 2.0, 0.0, 0.0, 0.05, False, True, 0.0, 0.0,, -0.5) MoveAnimation.AnimationMove(FireballEntity, True, 2.0, 0.0, 0.0, 0.05, False, True, 0.0, 0.0,, -0.5)
MoveAnimation.AnimationPlaySound("Battle\Attacks\Fire\Ember_Start", 0, 0)
For i = 0 To 12
Dim SmokeEntity = MoveAnimation.SpawnEntity(New Vector3(CSng(i * 0.2), 0.0, 0.0), TextureManager.GetTexture("Textures\Battle\Fire\Smoke"), New Vector3(0.2), 1, CSng(i * 0.2))
MoveAnimation.AnimationFade(SmokeEntity, True, 0.02, False, 0.0, CSng(i * 0.2), 0.0)
i += 1
Next
BattleScreen.BattleQuery.Add(MoveAnimation) BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub End Sub
@ -84,12 +78,6 @@
MoveAnimation.AnimationMove(FireballEntity, True, -0.05, 0.0, 0.0, 0.05, False, True, 0.0, 1.0,, -0.5) MoveAnimation.AnimationMove(FireballEntity, True, -0.05, 0.0, 0.0, 0.05, False, True, 0.0, 1.0,, -0.5)
For i = 0 To 12
Dim SmokeEntity = MoveAnimation.SpawnEntity(New Vector3(CSng(-3.0 + i * 0.2), 0.0, 0.0), TextureManager.GetTexture("Textures\Battle\Fire\Smoke"), New Vector3(0.2), 1, CSng(i * 0.2))
MoveAnimation.AnimationFade(SmokeEntity, True, 0.02, False, 0.0, CSng(i * 0.2), 0.0)
i += 1
Next
MoveAnimation.AnimationPlaySound("Battle\Attacks\Fire\Ember_Hit", 4, 0) MoveAnimation.AnimationPlaySound("Battle\Attacks\Fire\Ember_Hit", 4, 0)
Dim FireEntity1 As Entity = MoveAnimation.SpawnEntity(New Vector3(-0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 3, 0) Dim FireEntity1 As Entity = MoveAnimation.SpawnEntity(New Vector3(-0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 3, 0)

View File

@ -69,10 +69,10 @@
Dim SoundwaveEntity As Entity Dim SoundwaveEntity As Entity
' If BattleFlip = False Then ' If BattleFlip = False Then
SoundwaveEntity = MoveAnimation.SpawnEntity(New Vector3(0.25, -0.25, 0), TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 0, 1) SoundwaveEntity = MoveAnimation.SpawnEntity(New Vector3(0.25, -0.25, 0), TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 0, 1)
'Else 'Else
' SoundwaveEntity = MoveAnimation.SpawnEntity(New Vector3(-0.25, -0.25, 0), TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 0, 1) ' SoundwaveEntity = MoveAnimation.SpawnEntity(New Vector3(-0.25, -0.25, 0), TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 0, 1)
'End If 'End If
MoveAnimation.AnimationChangeTexture(SoundwaveEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 32, 32, 32), ""), 1, 1) MoveAnimation.AnimationChangeTexture(SoundwaveEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 32, 32, 32), ""), 1, 1)
MoveAnimation.AnimationChangeTexture(SoundwaveEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 0, 32, 32), ""), 2, 1) MoveAnimation.AnimationChangeTexture(SoundwaveEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 0, 32, 32), ""), 2, 1)
MoveAnimation.AnimationChangeTexture(SoundwaveEntity, True, TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 32, 32, 32), ""), 3, 1) MoveAnimation.AnimationChangeTexture(SoundwaveEntity, True, TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 32, 32, 32), ""), 3, 1)

View File

@ -142,13 +142,13 @@ nextIndex:
If AnimationHasStarted = False Then If AnimationHasStarted = False Then
PokemonScale = BattleScreen.OppPokemonNPC.Scale PokemonScale = BattleScreen.OppPokemonNPC.Scale
'Ball is thrown 'Ball is thrown
Dim CatchAnimation = New BattleSystem.AnimationQueryObject(BattleScreen.OppPokemonNPC, Nothing, BattleScreen.OppPokemonModel) Dim CatchAnimation = New BattleSystem.AnimationQueryObject(Nothing, False, Nothing)
CatchAnimation.AnimationPlaySound("Battle\Pokeball\Throw", 0, 0) CatchAnimation.AnimationPlaySound("Battle\Pokeball\Throw", 0, 0)
Dim BallPosition As Vector3 = New Vector3(BattleScreen.OppPokemonNPC.Position.X - 3, BattleScreen.OppPokemonNPC.Position.Y + 0.15F, BattleScreen.OppPokemonNPC.Position.Z) Dim BallPosition As Vector3 = New Vector3(BattleScreen.OppPokemonNPC.Position.X - 3, 0.15F, BattleScreen.OppPokemonNPC.Position.Z)
Dim BallEntity As Entity = CatchAnimation.SpawnEntity(BallPosition, Ball.Texture, New Vector3(0.3F), 1.0F, 0, 0) Dim BallEntity As Entity = CatchAnimation.SpawnEntity(BallPosition, Ball.Texture, New Vector3(0.3F), 1.0F, 0, 0)
CatchAnimation.AnimationMove(BallEntity, False, 0F, 0.25F, 0, 0.075, False, False, 0F, 0F,,,, 0.025) CatchAnimation.AnimationMove(BallEntity, False, 3, 0.1F, 0, 0.075, False, False, 0F, 0F,,,, 0.025)
CatchAnimation.AnimationRotate(BallEntity, False, 0, 0, -0.5, 0, 0, -6 * MathHelper.Pi, 0, 0, False, False, True, False) CatchAnimation.AnimationRotate(BallEntity, False, 0, 0, -0.5, 0, 0, -6 * MathHelper.Pi, 0, 0, False, False, True, False)
CatchAnimation.AnimationRotate(BallEntity, False, 0, 0, 6 * MathHelper.Pi, 0, 0, 0, 4, 0, False, False, True, False) CatchAnimation.AnimationRotate(BallEntity, False, 0, 0, 6 * MathHelper.Pi, 0, 0, 0, 4, 0, False, False, True, False)
@ -157,22 +157,26 @@ nextIndex:
Dim SmokeParticlesClose As Integer = 0 Dim SmokeParticlesClose As Integer = 0
Do Do
Dim SmokePosition = New Vector3(BattleScreen.OppPokemonNPC.Position.X + CSng(Random.Next(-10, 10) / 10), BattleScreen.OppPokemonNPC.Position.Y + CSng(Random.Next(-10, 10) / 10), BattleScreen.OppPokemonNPC.Position.Z + CSng(Random.Next(-10, 10) / 10)) Dim SmokePosition = New Vector3(BattleScreen.OppPokemonNPC.Position.X + CSng(Random.Next(-10, 10) / 10), BattleScreen.OppPokemonNPC.Position.Y + CSng(Random.Next(-10, 10) / 10), BattleScreen.OppPokemonNPC.Position.Z + CSng(Random.Next(-10, 10) / 10))
Dim SmokeDestination = New Vector3(0.025F, 0.25F, 0.025F)
Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke") Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10)) Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
Dim SmokeSpeed = CSng(Random.Next(1, 3) / 25.0F) Dim SmokeSpeed = CSng(Random.Next(1, 3) / 25.0F)
Dim SmokeEntity = CatchAnimation.SpawnEntity(SmokePosition, SmokeTexture, SmokeScale, 1, 3, 0) Dim SmokeEntity = CatchAnimation.SpawnEntity(SmokePosition, SmokeTexture, SmokeScale, 1, 3, 0)
Dim SmokeDestination = New Vector3(BallEntity.Position.X - SmokePosition.X + 3, BallEntity.Position.Y - SmokePosition.Y, BallEntity.Position.Z - SmokePosition.Z)
CatchAnimation.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 3, 0) CatchAnimation.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 3, 0)
Threading.Interlocked.Increment(SmokeParticlesClose) Threading.Interlocked.Increment(SmokeParticlesClose)
Loop While SmokeParticlesClose <= 38 Loop While SmokeParticlesClose <= 38
' Pokémon Shrinks ' Pokémon Shrinks
CatchAnimation.AnimationScale(Nothing, False, False, 0.0F, 0.0F, 0.0F, 0.035F, 3, 0) CatchAnimation.AnimationScale(BattleScreen.OppPokemonNPC, False, False, 0.0F, 0.0F, 0.0F, 0.035F, 3, 0)
If BattleScreen.OppPokemonModel IsNot Nothing Then
CatchAnimation.AnimationScale(BattleScreen.OppPokemonModel, False, False, 0.0F, 0.0F, 0.0F, 0.035F, 3, 0)
End If
' Ball falls ' Ball falls
CatchAnimation.AnimationMove(BallEntity, False, 0, -0.25, 0, 0.1F, False, False, 8, 0) CatchAnimation.AnimationMove(BallEntity, False, 3, -0.35, 0, 0.1F, False, False, 8, 0)
CatchAnimation.AnimationPlaySound("Battle\Pokeball\Land", 9, 0) CatchAnimation.AnimationPlaySound("Battle\Pokeball\Land", 9, 0)
Dim Shakes As List(Of Boolean) = New List(Of Boolean) Dim Shakes As List(Of Boolean) = New List(Of Boolean)
@ -205,7 +209,7 @@ nextIndex:
If InBall = True Then If InBall = True Then
For i = 0 To 2 For i = 0 To 2
Dim StarPosition As Vector3 = New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, BattleScreen.OppPokemonNPC.Position.Y - 0.35F, BattleScreen.OppPokemonNPC.Position.Z - 0.05F) Dim StarPosition As Vector3 = New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, BattleScreen.OppPokemonNPC.Position.Y - 0.35F, BattleScreen.OppPokemonNPC.Position.Z - 0.05F)
Dim StarDestination As Vector3 = New Vector3(0 - 0.05F, 0.4F, 0 - ((1 - i) * 0.4F) - 0.05F) Dim StarDestination As Vector3 = New Vector3(0 + 0.05F, 0.4F, 0 - ((1 - i) * 0.4F) + 0.05F)
Dim StarEntity As Entity = CatchAnimation.SpawnEntity(StarPosition, TextureManager.GetTexture("Textures\Battle\BallCatchStar"), New Vector3(0.35F), 1.0F, 12 + Shakes.Count * 10) Dim StarEntity As Entity = CatchAnimation.SpawnEntity(StarPosition, TextureManager.GetTexture("Textures\Battle\BallCatchStar"), New Vector3(0.35F), 1.0F, 12 + Shakes.Count * 10)
CatchAnimation.AnimationMove(StarEntity, True, StarDestination.X, StarDestination.Y, StarDestination.Z, 0.01F, False, False, 12 + Shakes.Count * 10, 0.0F,,, 3, 0.02F) CatchAnimation.AnimationMove(StarEntity, True, StarDestination.X, StarDestination.Y, StarDestination.Z, 0.01F, False, False, 12 + Shakes.Count * 10, 0.0F,,, 3, 0.02F)
CatchAnimation.AnimationPlaySound("Battle\Pokeball\Catch", 12 + Shakes.Count * 10, 4) CatchAnimation.AnimationPlaySound("Battle\Pokeball\Catch", 12 + Shakes.Count * 10, 4)
@ -232,7 +236,10 @@ nextIndex:
Loop While SmokeParticlesOpen <= 38 Loop While SmokeParticlesOpen <= 38
' Pokemon appears ' Pokemon appears
CatchAnimation.AnimationScale(Nothing, False, True, PokemonScale.X, PokemonScale.Y, PokemonScale.Z, 0.035F, 12 + Shakes.Count * 10, 0) CatchAnimation.AnimationScale(BattleScreen.OppPokemonNPC, False, True, PokemonScale.X, PokemonScale.Y, PokemonScale.Z, 0.035F, 12 + Shakes.Count * 10, 0)
If BattleScreen.OppPokemonModel IsNot Nothing Then
CatchAnimation.AnimationScale(BattleScreen.OppPokemonModel, False, True, PokemonScale.X, PokemonScale.Y, PokemonScale.Z, 0.035F, 12 + Shakes.Count * 10, 0)
End If
End If End If
AnimationList.Add(CatchAnimation) AnimationList.Add(CatchAnimation)