Prepared funcionality for sparkling mega stones
This commit is contained in:
parent
f046a5ec1d
commit
bc24c67bae
|
@ -12,6 +12,7 @@
|
||||||
Dim AnimationPath As String = ""
|
Dim AnimationPath As String = ""
|
||||||
Dim X, Y, width, height, rows, columns, animationSpeed, startRow, startColumn As Integer
|
Dim X, Y, width, height, rows, columns, animationSpeed, startRow, startColumn As Integer
|
||||||
Dim CurrentRectangle As New Rectangle(0, 0, 0, 0)
|
Dim CurrentRectangle As New Rectangle(0, 0, 0, 0)
|
||||||
|
Dim CanInteractWith As Boolean = True
|
||||||
|
|
||||||
Public Overloads Sub Initialize(Optional ByVal AnimationData As List(Of List(Of Integer)) = Nothing)
|
Public Overloads Sub Initialize(Optional ByVal AnimationData As List(Of List(Of Integer)) = Nothing)
|
||||||
MyBase.Initialize()
|
MyBase.Initialize()
|
||||||
|
@ -26,6 +27,7 @@
|
||||||
Me.Visible = False
|
Me.Visible = False
|
||||||
Me.Collision = False
|
Me.Collision = False
|
||||||
ElseIf Me.ActionValue = 2 Then
|
ElseIf Me.ActionValue = 2 Then
|
||||||
|
If Core.Player.Inventory.HasMegaBracelet() Then
|
||||||
Me.Visible = Visible
|
Me.Visible = Visible
|
||||||
'sparkles
|
'sparkles
|
||||||
If AnimationData IsNot Nothing Then
|
If AnimationData IsNot Nothing Then
|
||||||
|
@ -54,6 +56,12 @@
|
||||||
CreateAnimationTextureTemp()
|
CreateAnimationTextureTemp()
|
||||||
|
|
||||||
Me.Animation = New Animation(TextureManager.GetTexture("Textures\Routes"), rows, columns, 16, 16, animationSpeed, startRow, startColumn)
|
Me.Animation = New Animation(TextureManager.GetTexture("Textures\Routes"), rows, columns, 16, 16, animationSpeed, startRow, startColumn)
|
||||||
|
|
||||||
|
Else
|
||||||
|
Me.Visible = False
|
||||||
|
Me.Collision = False
|
||||||
|
CanInteractWith = False
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Me.NeedsUpdate = True
|
Me.NeedsUpdate = True
|
||||||
|
@ -130,6 +138,7 @@
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub ClickFunction()
|
Public Overrides Sub ClickFunction()
|
||||||
|
If CanInteractWith Then
|
||||||
RemoveItem(Me)
|
RemoveItem(Me)
|
||||||
SoundManager.PlaySound("item_found", True)
|
SoundManager.PlaySound("item_found", True)
|
||||||
Screen.TextBox.TextColor = TextBox.PlayerColor
|
Screen.TextBox.TextColor = TextBox.PlayerColor
|
||||||
|
@ -138,6 +147,7 @@
|
||||||
PlayerStatistics.Track("Items found", 1)
|
PlayerStatistics.Track("Items found", 1)
|
||||||
|
|
||||||
Core.Player.AddPoints(1, "Found an item.")
|
Core.Player.AddPoints(1, "Found an item.")
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub Render()
|
Public Overrides Sub Render()
|
||||||
|
|
|
@ -144,6 +144,19 @@ Public Class PlayerInventory
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' If the player has the Mega Bracelet in their inventory.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property HasMegaBracelet() As Boolean
|
||||||
|
Get
|
||||||
|
If Me.GetItemAmount(576) > 0 Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return False
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Returns a message that displays the event of putting an item into the inventory.
|
''' Returns a message that displays the event of putting an item into the inventory.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue