Accelerate time when all entities are dead
This commit is contained in:
parent
5f607aa6d5
commit
8c075b25b0
|
@ -350,6 +350,14 @@ export function GameState(ctx: ContextI, selectedAnimal: string, selectedSegment
|
||||||
updateGameOver()
|
updateGameOver()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// If it's just the player at night, accelerate time.
|
||||||
|
if (entities.filter(v=>v instanceof AnimalEntity).length === 1) {
|
||||||
|
if (isNight) {
|
||||||
|
modeTimer += realDelta * 4
|
||||||
|
} else {
|
||||||
|
modeTimer += realDelta
|
||||||
|
}
|
||||||
|
}
|
||||||
// Update clock
|
// Update clock
|
||||||
{
|
{
|
||||||
//clockContainer.width = ctx.app.renderer.width
|
//clockContainer.width = ctx.app.renderer.width
|
||||||
|
@ -689,6 +697,8 @@ export function GameState(ctx: ContextI, selectedAnimal: string, selectedSegment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nightTime = (30+daysSurvived) * 1000
|
||||||
|
dayTime = (30-daysSurvived) * 1000
|
||||||
}
|
}
|
||||||
|
|
||||||
nightfall(false)
|
nightfall(false)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user