ActiveModification: Visuals

main
Benjamin Kraft 1 year ago
parent 2e1ee2c7b0
commit 39511844bc
  1. 12
      Assets/Scripts/Game/Modification.cs
  2. 2
      README.md

@ -17,7 +17,17 @@ namespace Game {
modifications.Add(this);
VisualElement element = GameUI.AddModification(panel, this);
yield return new WaitForSeconds(Properties.activeDuration);
float doNothingTime = Properties.activeDuration * 0.7f;
float animateTime = Properties.activeDuration * 0.3f;
yield return new WaitForSeconds(doNothingTime);
float current = 0;
while (current < animateTime) {
current += Time.deltaTime;
element.style.opacity = new StyleFloat(1 - current / animateTime);
yield return null;
}
element.RemoveFromHierarchy();
modifications.Remove(this);

@ -1,8 +1,6 @@
## Tasks
### Game
- ActiveModification:
- Visuals
- Left,Right Buttons:
- Function
- Content (icon)

Loading…
Cancel
Save