public CatcherTrailEntry(double startTime, CatcherAnimationState catcherState, float position, Vector2 scale, CatcherTrailAnimation animation) { LifetimeStart = startTime; CatcherState = catcherState; Position = position; Scale = scale; Animation = animation; }
public CatcherSprite(CatcherAnimationState state) : base(new CatchSkinComponent(componentFromState(state)), _ => new DefaultCatcherSprite(state), confineMode: ConfineMode.ScaleDownToFit) { RelativeSizeAxes = Axes.None; Size = new Vector2(CatcherArea.CATCHER_SIZE); // Sets the origin roughly to the centre of the catcher's plate to allow for correct scaling. OriginPosition = new Vector2(0.5f, 0.06f) * CatcherArea.CATCHER_SIZE; }
private static CatchSkinComponents componentFromState(CatcherAnimationState state) { switch (state) { case CatcherAnimationState.Fail: return(CatchSkinComponents.CatcherFail); case CatcherAnimationState.Kiai: return(CatchSkinComponents.CatcherKiai); default: return(CatchSkinComponents.CatcherIdle); } }
private void checkState(CatcherAnimationState state) => AddAssert($"catcher state is {state}", () => catcher.CurrentState == state);
public DefaultCatcherSprite(CatcherAnimationState state) { this.state = state; }