Skip to content

Commit

Permalink
Car-ride game: use tighter collision polygon for cars.
Browse files Browse the repository at this point in the history
  • Loading branch information
litan committed Apr 20, 2015
1 parent 91c8530 commit b49ea2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/main/resources/samples/car-ride.kojo
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
switchToDefault2Perspective()
val carHeight = 100
val markerHeight = 80
val carE = PicShape.rect(carHeight, 50)
// The collision polygon for the (very similarly sized) car images car1.png and car2.png
val carE = trans(2, 14) -> Picture {
repeat(2) {
forward(70); right(45); forward(20); right(45)
forward(18); right(45); forward(20); right(45)
}
}
def car(img: String) = PicShape.image(img, carE)

val cars = collection.mutable.Map.empty[Picture, Vector2D]
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/net/kogics/kojo/lite/Versions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package net.kogics.kojo.lite
object Versions {
val KojoMajorVersion = "2.4 Beta"
val KojoVersion = "2.4.06"
val KojoRevision = "r40"
val KojoBuildDate = "19 Apr 2015"
val KojoRevision = "r41"
val KojoBuildDate = "20 Apr 2015"
val JavaVersion = geogebra.main.AppD.getJavaVersion
val ScalaVersion = scala.tools.nsc.Properties.versionString.substring("version ".length)
}

0 comments on commit b49ea2d

Please sign in to comment.