public KeyboardControls(Keys lMov = Keys.Left, Keys rMov = Keys.Right, Keys lRot = Keys.Z, Keys rRot = Keys.X, Keys hold = Keys.C, Keys softDrop = Keys.Down, Keys hardDrop = Keys.Space, float delayedAutoShift = 133, float autoRepeatRate = 5) : base() { LMove.AddKeyboardKey(lMov); RMove.AddKeyboardKey(rMov); LRotate.AddKeyboardKey(lRot); RRotate.AddKeyboardKey(rRot); Hold.AddKeyboardKey(hold); SoftDrop.AddKeyboardKey(softDrop); HardDrop.AddKeyboardKey(hardDrop); LMove.SetRepeat(delayedAutoShift / 1000, autoRepeatRate / 1000); RMove.SetRepeat(delayedAutoShift / 1000, autoRepeatRate / 1000); }
public void Set(ZPoint p, float gameTime, bool commonQueue) { if (value == null) value = new ZPoint(); RMove rMove = new RMove(r, p - value, gameTime); if (commonQueue) B.combatAnimations.Add(rMove); else animations.Add(rMove); value = p; }
public TextureAnimation(Texture2D texturei, Vector2 start, Vector2 finish, float gameTime) { position = new RPoint(start); rMove = new RMove(position, finish - start, gameTime); texture = texturei; maxFrameTime = (int)(gameTime * FramesInOneGameTime); frameTime = 0; }
public void Set(float valuei, float gameTime, bool commonQueue) { RMove rMove = new RMove(r, new Vector2(valuei - value, 0), gameTime); if (commonQueue) B.scaleAnimations.Add(rMove); else animations.Add(rMove); value = valuei; }