Fix campfire bug
This commit is contained in:
parent
6835ba513c
commit
f6e14e0ec4
@ -133,9 +133,7 @@ public class ItemGrabber : MonoBehaviour {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PrimaryIndicator.alpha = Mathf.Lerp(PrimaryIndicator.alpha,
|
float PrimaryIndicatorTargetAlpha = 1;
|
||||||
Casette != null || LookedAtItem != null || Campfire != null || ThrowableItem != null ? 1 : 0,
|
|
||||||
10f * Time.deltaTime);
|
|
||||||
if (Casette != null) {
|
if (Casette != null) {
|
||||||
PrimaryText.text = Casette.DisplayPrompt;
|
PrimaryText.text = Casette.DisplayPrompt;
|
||||||
} else if (Campfire != null && ThrowableItem != null) {
|
} else if (Campfire != null && ThrowableItem != null) {
|
||||||
@ -144,12 +142,15 @@ public class ItemGrabber : MonoBehaviour {
|
|||||||
PrimaryText.text = $"Take {LookedAtItem.Quality.DisplayName}";
|
PrimaryText.text = $"Take {LookedAtItem.Quality.DisplayName}";
|
||||||
} else if (ThrowableItem != null) {
|
} else if (ThrowableItem != null) {
|
||||||
PrimaryText.text = $"Throw {ThrowableItem.Quality.DisplayName}";
|
PrimaryText.text = $"Throw {ThrowableItem.Quality.DisplayName}";
|
||||||
|
} else {
|
||||||
|
PrimaryIndicatorTargetAlpha = 0;
|
||||||
}
|
}
|
||||||
|
PrimaryIndicator.alpha = Mathf.Lerp(PrimaryIndicator.alpha, PrimaryIndicatorTargetAlpha, 10f * Time.deltaTime);
|
||||||
|
|
||||||
SecondaryIndicator.alpha = Mathf.Lerp(SecondaryIndicator.alpha, CanIgniteTorch ? 1 : 0, 10f * Time.deltaTime);
|
|
||||||
if (CanIgniteTorch) {
|
if (CanIgniteTorch) {
|
||||||
SecondaryText.text = $"Ignite {TorchableItem.Quality.DisplayName}";
|
SecondaryText.text = $"Ignite {TorchableItem.Quality.DisplayName}";
|
||||||
}
|
}
|
||||||
|
SecondaryIndicator.alpha = Mathf.Lerp(SecondaryIndicator.alpha, CanIgniteTorch ? 1 : 0, 10f * Time.deltaTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Item GetTorchableItem() {
|
private Item GetTorchableItem() {
|
||||||
|
Loading…
Reference in New Issue
Block a user