Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
delorum committed Mar 28, 2012
1 parent 088ddec commit b33daae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions blases/src/main/scala/net/scage/blases/Blase.scala
Expand Up @@ -28,6 +28,7 @@ class Blase(init_coord: Vec, direction:Vec) extends DynaBall(init_coord, radius
delOperations(action_id, render_id)
tracer.removeTraces(this)
physics.removePhysicals(this)
if(selected_blase == this) selected_blase = no_selection
}

private val render_id = render {
Expand Down
8 changes: 7 additions & 1 deletion blases/src/main/scala/net/scage/blases/Blases.scala
Expand Up @@ -50,7 +50,12 @@ object Blases extends Screen("Blases Game") with MultiController {
else if(selected_blase.id != no_selection.id) drawLine(selected_blase.location, (mouseCoord - selected_blase.location).n*rInt(40) + selected_blase.location, RED)
}

private val no_selection = new DynaBall(Vec.zero, radius = 20) with TraceTrait {
interface {
print("Score: "+score, 20, windowHeight-20, WHITE)
print(score_for_level, 20, windowHeight-40, WHITE)
}

private[blases] val no_selection = new DynaBall(Vec.zero, radius = 20) with TraceTrait {
def state = State()
type ChangerType = Trace
def changeState(changer:Trace, s:State) {}
Expand Down Expand Up @@ -108,6 +113,7 @@ object Blases extends Screen("Blases Game") with MultiController {
init {
levels(current_level).load()
is_game_started = false
selected_blase = no_selection
score_for_level = 10000
}

Expand Down

0 comments on commit b33daae

Please sign in to comment.