1
Releases / Re: 2D Toolkit 2.1 final + hotfix 1
« on: August 13, 2013, 07:41:44 pm »
You had fixed this in 1.92, isn't there a way to fix this in 2.1 since the issue has reappeared?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
public void clickedFA ()
{
// tracker.AddProgressToAchievement ("Shielded", 1.0f);
// StoreInventory.TakeItem (itemId, 1);
// balance = StoreInventory.GetItemBalance (itemId);
balance--;
textMesh.text = balance.ToString ();
textMesh.Commit ();
icon.color = Color.gray;
cooldownActive = !cooldownActive;
Invoke("ResetIcon", 5); // cooldown in 5 seconds.
ActivateShield();
}
private void ActivateShield() {
sprite.gameObject.SetActive(true);
Invoke("DectivateShield", 3); // last 3 seconds
}
private void DectivateShield() {
sprite.gameObject.SetActive(false);
}
public class PauseButton : MonoBehaviour {
public TimerCountdown script;
void OnClick() {
script.timerActive = !script.timerActive;
script.gamePaused = !script.gamePaused;
}
}