public OffendedViewModel(ISpeaker speaker, IShrink shrink) { _speaker = speaker; _shrink = shrink; CheckIfImOffended = new MvxCommand(() => { OffendedState myState = _shrink.AmIOffended(); switch (myState) { case OffendedState.NotOffended: OffendedResultText = "You have absolutely no reason to be offended"; break; case OffendedState.Offended: OffendedResultText = "You should be offended!"; break; case OffendedState.VeryOffended: OffendedResultText = "The level of offended you should be has reached epic!"; break; default: throw new ArgumentOutOfRangeException(); } _speaker.Speak(OffendedResultText); }); }
public void Initialise(IShrink target) { this.target = target; timers = new float[maxStacks]; }