public override void Act(KeyboardState ks, MouseState ms) { _p = (_p + 0.0025f * KWEngine.DeltaTimeFactor) % 1f; if (HasAnimations) { AnimationID = 0; AnimationPercentage = _p; } if (ks[Key.Z]) { if (GetAttachedGameObjectForBone("Weapon") != null) { DetachGameObjectFromBone("Weapon"); } } else if (ks[Key.X]) { GameObject attachment = CurrentWorld.GetGameObjectByName("Attachment"); if (attachment != null) { if (GetAttachedGameObjectForBone("Weapon") == null) { AttachGameObjectToBone(attachment, "Weapon"); } } } /* * if(ks[Key.W]) * { * MoveOffset(0, 0.025f * KWEngine.DeltaTimeFactor, 0); * } * if (ks[Key.S]) * { * MoveOffset(0, -0.025f * KWEngine.DeltaTimeFactor, 0); * } */ }