예제 #1
0
 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);
 }
예제 #2
0
파일: LocalPosition.cs 프로젝트: mxgmn/GENW
    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;
    }
예제 #3
0
파일: Animations.cs 프로젝트: mxgmn/GENW
    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;
    }
예제 #4
0
파일: Initiative.cs 프로젝트: mxgmn/GENW
 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;
 }