Fixed a lot of animation system bugs
Fixed: * Spawned entities not appearing * Animations getting removed too soon * Incorrect relative positioning * Ember textures being searched for in the wrong place
This commit is contained in:
parent
944cf6ae71
commit
7fba875d02
|
@ -59,8 +59,7 @@
|
|||
|
||||
Private Sub Spin()
|
||||
If Me.SpinX = True Then
|
||||
Dim targetEntity = Me.TargetEntity
|
||||
targetEntity.Rotation.X += SpinSpeedX
|
||||
TargetEntity.Rotation.X += SpinSpeedX
|
||||
End If
|
||||
If Me.SpinZ = True Then
|
||||
TargetEntity.Rotation.Z += SpinSpeedZ
|
||||
|
|
|
@ -25,18 +25,15 @@
|
|||
Public Ready As Boolean = False
|
||||
Public startDelay As Single
|
||||
Public endDelay As Single
|
||||
Public SpawnedEntity As Entity = Nothing
|
||||
Public SpawnedEntity As Boolean = False
|
||||
|
||||
Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal startDelay As Single, ByVal endDelay As Single, Optional SpawnedEntity As Entity = Nothing)
|
||||
Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal startDelay As Single, ByVal endDelay As Single, Optional SpawnedEntity As Boolean = False)
|
||||
MyBase.New(Position.X, Position.Y, Position.Z, "BattleAnimation", {Texture}, {0, 0}, False, 0, Scale, BaseModel.BillModel, 0, "", New Vector3(1.0F))
|
||||
|
||||
Me.Visible = Visible
|
||||
Me.startDelay = startDelay
|
||||
Me.endDelay = endDelay
|
||||
|
||||
If SpawnedEntity IsNot Nothing Then
|
||||
Me.SpawnedEntity = SpawnedEntity
|
||||
End If
|
||||
Me.SpawnedEntity = SpawnedEntity
|
||||
|
||||
Me.CreateWorldEveryFrame = True
|
||||
Me.DropUpdateUnlessDrawn = False
|
||||
|
@ -62,7 +59,7 @@
|
|||
startDelay = 0.0F
|
||||
End If
|
||||
Else
|
||||
If SpawnedEntity IsNot Nothing Then
|
||||
If SpawnedEntity = True Then
|
||||
Ready = True
|
||||
End If
|
||||
DoActionActive()
|
||||
|
|
|
@ -1496,7 +1496,7 @@
|
|||
End If
|
||||
|
||||
'Own Pokémon move animation! This displays any effects that should display on the user of the move.
|
||||
moveUsed.UserPokemonMoveAnimation(BattleScreen, own)
|
||||
moveUsed.UserPokemonMoveAnimation(BattleScreen, Not own)
|
||||
|
||||
If moveUsed.Target <> Attack.Targets.Self And moveUsed.FocusOppPokemon = True Then
|
||||
If own = True Then
|
||||
|
@ -2707,7 +2707,7 @@
|
|||
'Burn animation
|
||||
Dim BurnAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own)
|
||||
BurnAnimation.AnimationPlaySound("Battle\Effects\Burned", 0, 0)
|
||||
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)
|
||||
Dim FlameEntity As Entity = BurnAnimation.SpawnEntity(New Vector3(CSng(-0.25), CSng(-0.25), CSng(-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.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32)), 2, 1)
|
||||
BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32)), 3, 1)
|
||||
BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32)), 4, 1)
|
||||
|
@ -3420,8 +3420,8 @@
|
|||
Dim xPos = CSng((Random.NextDouble() - 0.5) * 1.2)
|
||||
Dim zPos = CSng((Random.NextDouble() - 0.5) * 1.2)
|
||||
|
||||
Dim Position As New Vector3(xPos + pNPC.Position.X, CSng(pNPC.Position.Y - 0.4), pNPC.Position.Z + zPos)
|
||||
Dim Destination As New Vector3(xPos + pNPC.Position.X, CSng(pNPC.Position.Y + 0.8), zPos + pNPC.Position.Z)
|
||||
Dim Position As New Vector3(xPos, -0.4, zPos)
|
||||
Dim Destination As New Vector3(xPos, 0.8, zPos)
|
||||
Dim Scale As New Vector3(0.2F)
|
||||
|
||||
Dim StatEntity As Entity = StatAnimation.SpawnEntity(Position, Texture, Scale, 1.0F)
|
||||
|
@ -3701,8 +3701,8 @@
|
|||
Dim xPos = CSng((Random.NextDouble() - 0.5) * 1.2)
|
||||
Dim zPos = CSng((Random.NextDouble() - 0.5) * 1.2)
|
||||
|
||||
Dim Position As New Vector3(xPos + pNPC.Position.X, CSng(pNPC.Position.Y + 0.8), pNPC.Position.Z + zPos)
|
||||
Dim Destination As New Vector3(xPos + pNPC.Position.X, CSng(pNPC.Position.Y - 0.4), zPos + pNPC.Position.Z)
|
||||
Dim Position As New Vector3(xPos, 0.8, zPos)
|
||||
Dim Destination As New Vector3(xPos, -0.4, zPos)
|
||||
Dim Scale As New Vector3(0.2F)
|
||||
|
||||
Dim StatEntity As Entity = StatAnimation.SpawnEntity(Position, Texture, Scale, 1.0F)
|
||||
|
@ -5419,7 +5419,7 @@
|
|||
Dim BurnAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OwnPokemonNPC, False)
|
||||
BurnAnimation.AnimationPlaySound("Battle\Effects\Burned", 0, 0)
|
||||
|
||||
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)
|
||||
Dim FlameEntity As Entity = BurnAnimation.SpawnEntity(New Vector3(0.25F, 0.25F, 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.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32)), 2, 1)
|
||||
BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32)), 3, 1)
|
||||
BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32)), 4, 1)
|
||||
|
@ -6214,10 +6214,10 @@
|
|||
reduceAmount = CInt(.OppPokemon.MaxHP / 16)
|
||||
End If
|
||||
'Burn animation
|
||||
Dim BurnAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, False)
|
||||
Dim BurnAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, True)
|
||||
BurnAnimation.AnimationPlaySound("Battle\Effects\Burned", 0, 0)
|
||||
|
||||
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)
|
||||
Dim FlameEntity As Entity = BurnAnimation.SpawnEntity(New Vector3(0.25, 0.25, 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.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32)), 2, 1)
|
||||
BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32)), 3, 1)
|
||||
BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32)), 4, 1)
|
||||
|
@ -6816,8 +6816,8 @@
|
|||
|
||||
' Ball returns
|
||||
BallReturn.AnimationPlaySound("Battle\Pokeball\Throw", 1, 0)
|
||||
Dim BallReturnEntity As Entity = BallReturn.SpawnEntity(BattleScreen.OwnPokemonNPC.Position, TextureManager.GetTexture(BattleScreen.OwnPokemon.CatchBall.TextureSource), New Vector3(0.3F), 1.0F)
|
||||
BallReturn.AnimationMove(BallReturnEntity, True, BattleScreen.OwnPokemonNPC.Position.X - 2, BattleScreen.OwnPokemonNPC.Position.Y, BattleScreen.OwnPokemonNPC.Position.Z, 0.1, False, True, 1, 0,, 0.3)
|
||||
Dim BallReturnEntity As Entity = BallReturn.SpawnEntity(New Vector3(0.0F), TextureManager.GetTexture(BattleScreen.OwnPokemon.CatchBall.TextureSource), New Vector3(0.3F), 1.0F)
|
||||
BallReturn.AnimationMove(BallReturnEntity, True, -2, 0, 0, 0.1, False, True, 1, 0,, 0.3)
|
||||
|
||||
BattleScreen.AddToQuery(InsertIndex, BallReturn)
|
||||
|
||||
|
@ -6858,8 +6858,8 @@
|
|||
|
||||
BallThrow.AnimationPlaySound("Battle\Pokeball\Throw", 0, 0)
|
||||
|
||||
Dim BallThrowEntity As Entity = BallReturn.SpawnEntity(BattleScreen.OwnPokemonNPC.Position + New Vector3(-2, -0.15, 0), TextureManager.GetTexture(BattleScreen.OwnPokemon.CatchBall.TextureSource), New Vector3(0.3F), 1.0F)
|
||||
BallThrow.AnimationMove(BallThrowEntity, True, BattleScreen.OwnPokemonNPC.Position.X, CSng(BattleScreen.OwnPokemonNPC.Position.Y + 0.35), BattleScreen.OwnPokemonNPC.Position.Z, 0.1, False, True, 0F, 0F,, 0.3)
|
||||
Dim BallThrowEntity As Entity = BallReturn.SpawnEntity(New Vector3(-2, -0.15, 0), TextureManager.GetTexture(BattleScreen.OwnPokemon.CatchBall.TextureSource), New Vector3(0.3F), 1.0F)
|
||||
BallThrow.AnimationMove(BallThrowEntity, True, 0, 0.35, 0, 0.1, False, True, 0F, 0F,, 0.3)
|
||||
|
||||
' Ball Opens
|
||||
BallThrow.AnimationPlaySound("Battle\Pokeball\Open", 3, 0)
|
||||
|
|
|
@ -815,7 +815,7 @@ nextIndex:
|
|||
If BattleQuery.Count > cIndex Then
|
||||
Dim cQueryObject As QueryObject = BattleQuery(cIndex)
|
||||
If cQueryObject.QueryType = QueryObject.QueryTypes.MoveAnimation Then
|
||||
If CType(cQueryObject, AnimationQueryObject).DrawBeforeEntities = False Then
|
||||
If CType(cQueryObject, AnimationQueryObject).DrawBeforeEntities = True Then
|
||||
cQuery.Add(cQueryObject)
|
||||
Else
|
||||
ForegroundAnimationList.Add(CType(cQueryObject, AnimationQueryObject))
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
Public Sub New(ByVal entity As Entity, ByVal BattleFlipped As Boolean, Optional ByVal model As ModelEntity = Nothing, Optional DrawBeforeEntities As Boolean = False)
|
||||
MyBase.New(QueryTypes.MoveAnimation)
|
||||
Me.AnimationSequence = New List(Of BattleAnimation3D)
|
||||
Me.SpawnedEntities = New List(Of Entity)
|
||||
Me.DrawBeforeEntities = DrawBeforeEntities
|
||||
If BattleFlipped <> Nothing Then
|
||||
Me.BattleFlipped = BattleFlipped
|
||||
|
@ -40,6 +41,9 @@
|
|||
RenderObjects.Add(a)
|
||||
End If
|
||||
Next
|
||||
For Each entity As BattleAnimation3D In Me.SpawnedEntities
|
||||
RenderObjects.Add(entity)
|
||||
Next
|
||||
If RenderObjects.Count > 0 Then
|
||||
RenderObjects = (From r In RenderObjects Order By r.CameraDistance Descending).ToList()
|
||||
End If
|
||||
|
@ -60,9 +64,6 @@
|
|||
i -= 1
|
||||
AnimationSequence.Remove(a)
|
||||
Else
|
||||
If a.SpawnedEntity IsNot Nothing And a.Ready = True Then
|
||||
SpawnedEntities.Add(a.SpawnedEntity)
|
||||
End If
|
||||
a.Update()
|
||||
End If
|
||||
End If
|
||||
|
@ -75,6 +76,7 @@
|
|||
Animation.UpdateEntity()
|
||||
Next
|
||||
For Each Entity As Entity In SpawnedEntities
|
||||
Entity.Update()
|
||||
Entity.UpdateEntity()
|
||||
Next
|
||||
End If
|
||||
|
@ -89,21 +91,23 @@
|
|||
End Sub
|
||||
|
||||
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
|
||||
If Not BattleFlipped = Nothing Then
|
||||
If BattleFlipped = True Then
|
||||
Position.X = CurrentEntity.Position.X - Position.X * 2.0F
|
||||
Position.Z = CurrentEntity.Position.Z - Position.Z * 2.0F
|
||||
Else
|
||||
Position.X = CurrentEntity.Position.X + Position.X * 2.0F
|
||||
Position.Z = CurrentEntity.Position.Z + Position.Z * 2.0F
|
||||
End If
|
||||
End If
|
||||
|
||||
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))
|
||||
Dim SpawnedEntity = New BattleAnimation3D(Position, Texture, Scale, 0, 0, False)
|
||||
SpawnedEntity.Opacity = Opacity
|
||||
|
||||
Dim SpawnDelayEntity As BattleAnimation3D = New BattleAnimation3D(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay, SpawnedEntity)
|
||||
If Not BattleFlipped = Nothing Then
|
||||
If BattleFlipped = True Then
|
||||
SpawnedEntity.Position.X = CurrentEntity.Position.X - Position.X
|
||||
SpawnedEntity.Position.Y = CurrentEntity.Position.Y + Position.Y
|
||||
SpawnedEntity.Position.Z = CurrentEntity.Position.Z - Position.Z
|
||||
Else
|
||||
SpawnedEntity.Position.X = CurrentEntity.Position.X + Position.X
|
||||
SpawnedEntity.Position.Y = CurrentEntity.Position.Y + Position.Y
|
||||
SpawnedEntity.Position.Z = CurrentEntity.Position.Z + Position.Z
|
||||
End If
|
||||
End If
|
||||
SpawnedEntities.Add(SpawnedEntity)
|
||||
|
||||
Dim SpawnDelayEntity As BattleAnimation3D = New BattleAnimation3D(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay, True)
|
||||
AnimationSequence.Add(SpawnDelayEntity)
|
||||
Return SpawnedEntity
|
||||
End Function
|
||||
|
@ -124,7 +128,7 @@
|
|||
|
||||
If RemoveEntityAfter = True Then
|
||||
If baEntityTextureChange.CanRemove = True Then
|
||||
RemoveEntity(Entity)
|
||||
RemoveEntity(TextureChangeEntity)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
|
|
@ -2169,6 +2169,7 @@
|
|||
Dim CurrentEntity As NPC = BattleScreen.OwnPokemonNPC
|
||||
Dim CurrentModel As ModelEntity = BattleScreen.OwnPokemonModel
|
||||
If own = False Then
|
||||
CurrentPokemon = BattleScreen.OppPokemon
|
||||
CurrentEntity = BattleScreen.OppPokemonNPC
|
||||
CurrentModel = BattleScreen.OppPokemonModel
|
||||
End If
|
||||
|
@ -2186,6 +2187,7 @@
|
|||
Dim CurrentEntity As NPC = BattleScreen.OppPokemonNPC
|
||||
Dim CurrentModel As ModelEntity = BattleScreen.OppPokemonModel
|
||||
If own = False Then
|
||||
CurrentPokemon = BattleScreen.OwnPokemon
|
||||
CurrentEntity = BattleScreen.OwnPokemonNPC
|
||||
CurrentModel = BattleScreen.OwnPokemonModel
|
||||
End If
|
||||
|
|
|
@ -96,21 +96,21 @@
|
|||
Dim FireEntity2 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, 1, 1)
|
||||
Dim FireEntity3 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, 1, 1)
|
||||
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity1, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32)), 2, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity2, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32)), 2, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity3, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32)), 2, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity1, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32), ""), 2, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity2, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32), ""), 2, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity3, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32), ""), 2, 1)
|
||||
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity1, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32)), 3, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity2, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32)), 3, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity3, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32)), 3, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity1, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32), ""), 3, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity2, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32), ""), 3, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity3, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32), ""), 3, 1)
|
||||
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity1, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32)), 4, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity2, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32)), 4, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity3, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32)), 4, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity1, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32), ""), 4, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity2, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32), ""), 4, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity3, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32), ""), 4, 1)
|
||||
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity1, True, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32)), 5, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity2, True, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32)), 5, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity3, True, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32)), 5, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity1, True, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32), ""), 5, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity2, True, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32), ""), 5, 1)
|
||||
MoveAnimation.AnimationChangeTexture(FireEntity3, True, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32), ""), 5, 1)
|
||||
|
||||
BattleScreen.BattleQuery.Add(MoveAnimation)
|
||||
End Sub
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
Dim yPos As Single = CSng(Random.NextDouble() * 0.5)
|
||||
Dim zPos As Single = CSng(Random.Next(-5, 5) * 0.15)
|
||||
Dim AbsorbEntity = MoveAnimation.SpawnEntity(New Vector3(0.0, 0.0, 0.0), TextureManager.GetTexture("Textures\Battle\Grass\Absorb"), New Vector3(0.35F), 1)
|
||||
MoveAnimation.AnimationMove(AbsorbEntity, True, 1.5, yPos, zPos, 0.03, False, True, CSng(currentAmount), 0.0, 0.1, 0.5)
|
||||
MoveAnimation.AnimationMove(AbsorbEntity, True, -1.5, yPos, zPos, 0.03, False, True, CSng(currentAmount), 0.0, 0.1, 0.5)
|
||||
|
||||
Threading.Interlocked.Increment(currentAmount)
|
||||
End While
|
||||
|
|
|
@ -54,16 +54,16 @@
|
|||
|
||||
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)
|
||||
MoveAnimation.AnimationMove(Nothing, False, 0.5, 0, 0, 0.3, False, False, 0, 0,,, 2)
|
||||
MoveAnimation.AnimationMove(Nothing, False, 0, 0, 0, 0.3, False, False, 1, 0,,, 2)
|
||||
MoveAnimation.AnimationMove(Nothing, False, -0.5F, 0, 0, 0.3F, False, False, 0, 0,,, 2)
|
||||
MoveAnimation.AnimationMove(Nothing, False, 0, 0, 0, 0.3F, False, False, 1, 0,,, 2)
|
||||
BattleScreen.BattleQuery.Add(MoveAnimation)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub InternalOpponentPokemonMoveAnimation(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)
|
||||
MoveAnimation.AnimationPlaySound("Battle\Attacks\Normal\Tackle", 0, 2)
|
||||
Dim SpawnEntity = MoveAnimation.SpawnEntity(New Vector3(0, -0.25, 0), TextureManager.GetTexture("Textures\Battle\Normal\Tackle"), New Vector3(1.0F), 1.0F)
|
||||
MoveAnimation.AnimationFade(SpawnEntity, True, 0.02, False, 1.0F, 0, 2)
|
||||
MoveAnimation.AnimationPlaySound("Battle\Attacks\Normal\Tackle", 0, 0)
|
||||
Dim SpawnEntity = MoveAnimation.SpawnEntity(New Vector3(0, 0, 0), TextureManager.GetTexture("Textures\Battle\Normal\Tackle"), New Vector3(0.5F), 1.0F, 0, 2)
|
||||
MoveAnimation.AnimationFade(SpawnEntity, True, 1.0F, False, 0.0F, 2, 0)
|
||||
BattleScreen.BattleQuery.Add(MoveAnimation)
|
||||
End Sub
|
||||
End Class
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
|
||||
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)
|
||||
Dim StingerEntity As Entity = MoveAnimation.SpawnEntity(CurrentEntity.Position, TextureManager.GetTexture("Textures\Battle\Poison\Stinger"), New Vector3(0.5F), 1.0F)
|
||||
Dim StingerEntity As Entity = MoveAnimation.SpawnEntity(New Vector3(0.0, 0.0, 0.0), TextureManager.GetTexture("Textures\Battle\Poison\Stinger"), New Vector3(0.5F), 1.0F)
|
||||
|
||||
MoveAnimation.AnimationPlaySound("Battle\Attacks\Poison\PoisonSting_Start", 0, 0)
|
||||
MoveAnimation.AnimationMove(StingerEntity, True, 2.0, 0.0, 0.0, 0.05, False, False, 0.0, 0.0,,, 0)
|
||||
|
|
Loading…
Reference in New Issue