Skip to content

Commit

Permalink
Tweaks and fixes
Browse files Browse the repository at this point in the history
Emoji doesn't display question until activation.

Needy clears when timer expires.
  • Loading branch information
timtmok committed Aug 14, 2016
1 parent b701944 commit 82123b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 2 additions & 6 deletions Assets/Scripts/EmojiMathModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@ public class EmojiMathModule : MathModule

void Start()
{
DisplayText.text = string.Empty;
Init();
}

protected override void Init()
{
base.Init();
SetDisplay();
GetComponent<KMBombModule>().OnActivate += SetDisplay;
}

protected override void Solve()
Expand Down
3 changes: 2 additions & 1 deletion Assets/Scripts/NeedyMathModule.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using UnityEngine;

public class NeedyMathModule : MathModule
Expand All @@ -23,6 +22,7 @@ protected void OnNeedyDeactivation()

protected void OnNeedyActivation()
{
Answer = string.Empty;
Puzzle = MathFactory.Instance.GenerateQuestion();
SetDisplay();
}
Expand Down Expand Up @@ -68,6 +68,7 @@ protected override void Solve()

protected void OnTimerExpired()
{
OnNeedyDeactivation();
GetComponent<KMNeedyModule>().HandleStrike();
}
}

0 comments on commit 82123b8

Please sign in to comment.