Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

Commit

Permalink
RC2_20170916
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislo27 committed Sep 16, 2017
1 parent 7f2dcc2 commit cb68c48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/src/main/kotlin/io/github/chrislo27/rhre3/RHRE3.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import io.github.chrislo27.toolboks.version.Version
object RHRE3 {

const val TITLE = "Rhythm Heaven Remix Editor 3"
val VERSION: Version = Version(3, 2, 0, "RC1_20170915")
val VERSION: Version = Version(3, 2, 0, "RC2_20170916")
const val WIDTH = 1280
const val HEIGHT = 720
val DEFAULT_SIZE = WIDTH to HEIGHT
Expand All @@ -27,7 +27,7 @@ object RHRE3 {
const val DATABASE_URL: String = "https://github.com/chrislo27/RHRE-database.git"
const val DEV_DATABASE_BRANCH: String = "dev"
const val MASTER_DATABASE_BRANCH: String = "master"
const val DATABASE_BRANCH: String = "shake"
const val DATABASE_BRANCH: String = DEV_DATABASE_BRANCH
const val DATABASE_CURRENT_VERSION: String = "https://raw.githubusercontent.com/chrislo27/RHRE-database/$DATABASE_BRANCH/current.json"
const val DATABASE_RELEASES = "https://github.com/chrislo27/RHRE-database/releases"
const val RELEASE_API_URL = "https://api.github.com/repos/chrislo27/RhythmHeavenRemixEditor/releases/latest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,16 @@ class Editor(val main: RHRE3Application, stageCamera: OrthographicCamera)
camera.zoom = MathUtils.lerp(camera.zoom, if (ViewType.GAME_BOUNDARIES in views) 1.5f else 1f,
Gdx.graphics.deltaTime * 6.5f)
if (remix.playState == PlayState.PLAYING && remix.currentShakeEntities.isNotEmpty()) {
val shakeValue = remix.currentShakeEntities.fold(1f) { acc, it -> acc * ShakeEntity.getShakeIntensity(it.semitone)}
val shakeValue = remix.currentShakeEntities.fold(1f) { acc, it ->
acc * ShakeEntity.getShakeIntensity(it.semitone)
}
val intensity = 0.125f
val oldX = camera.position.x
val oldY = camera.position.y

camera.position.y += intensity * MathUtils.randomSign() * MathUtils.random(shakeValue)
camera.position.x += intensity * MathUtils.randomSign() * MathUtils.random(shakeValue) * (ENTITY_HEIGHT / ENTITY_WIDTH)
camera.position.x += intensity * MathUtils.randomSign() * MathUtils.random(
shakeValue) * (ENTITY_HEIGHT / ENTITY_WIDTH)

camera.update()

Expand Down

0 comments on commit cb68c48

Please sign in to comment.