Fix Item Finder and hidden item fading issues
This commit is contained in:
parent
9873f15aa5
commit
cab4e66cea
|
@ -14,6 +14,7 @@
|
|||
Dim X, Y, width, height, rows, columns, animationSpeed, startRow, startColumn As Integer
|
||||
Dim CurrentRectangle As New Rectangle(0, 0, 0, 0)
|
||||
Dim CanInteractWith As Boolean = True
|
||||
Public HiddenDelay As Date = Nothing
|
||||
|
||||
Public Overloads Sub Initialize(Optional ByVal AnimationData As List(Of List(Of Integer)) = Nothing)
|
||||
MyBase.Initialize()
|
||||
|
@ -101,11 +102,14 @@
|
|||
End If
|
||||
|
||||
If Me.IsHiddenItem() = True Then
|
||||
If Me.Opacity > 0.0F Then
|
||||
Me.Opacity -= 0.01F
|
||||
If Me.Opacity <= 0.0F Then
|
||||
Me.Opacity = 1.0F
|
||||
Me.Visible = False
|
||||
If HiddenDelay <> Nothing AndAlso Date.Now >= HiddenDelay Then
|
||||
If Me.Opacity > 0.0F Then
|
||||
Me.Opacity -= 0.01F
|
||||
If Me.Opacity <= 0.0F Then
|
||||
Me.Opacity = 0.0F
|
||||
Me.Visible = False
|
||||
End If
|
||||
Me.NormalOpacity = Me.Opacity
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
|
|
@ -20,7 +20,9 @@ Namespace Items.KeyItems
|
|||
Dim i As ItemObject = CType(e, ItemObject)
|
||||
If i.IsHiddenItem() = True Then
|
||||
i.Opacity = 1.0F
|
||||
i.NormalOpacity = 1.0F
|
||||
i.Visible = True
|
||||
i.HiddenDelay = Date.Now + New TimeSpan(0, 0, 3)
|
||||
found = True
|
||||
End If
|
||||
End If
|
||||
|
|
Loading…
Reference in New Issue