mirror of
https://github.com/tonytins/citylimits
synced 2025-06-26 01:44:42 -04:00
Merged varies scenes into game scene
- Merged GUI and world scenes into game scene with the GUI existing on a canvas layer - Ported over camera movement script
This commit is contained in:
parent
f5c7355d5a
commit
8a40969703
6 changed files with 171 additions and 113 deletions
|
@ -1,4 +1,4 @@
|
|||
extends Node
|
||||
extends Node2D
|
||||
|
||||
var noise: OpenSimplexNoise
|
||||
var map_size = Vector2(80, 60)
|
||||
|
@ -20,14 +20,14 @@ func make_terrian_map():
|
|||
for y in map_size.y:
|
||||
var a = noise.get_noise_2d(x, y)
|
||||
if a < terrian_cap:
|
||||
$Terrian.set_cell(x, y, 0)
|
||||
$terrian.set_cell(x, y, 0)
|
||||
|
||||
$Terrian.update_bitmask_region(Vector2(0.0, 0.0), Vector2(map_size.x, map_size.y))
|
||||
$terrian.update_bitmask_region(Vector2(0.0, 0.0), Vector2(map_size.x, map_size.y))
|
||||
|
||||
func make_water():
|
||||
for x in map_size.x:
|
||||
for y in map_size.y:
|
||||
if $Terrian.get_cell(x, y):
|
||||
$Water.set_cell(x, y, 0)
|
||||
if $terrian.get_cell(x, y):
|
||||
$water.set_cell(x, y, 0)
|
||||
|
||||
$Water.update_bitmask_region(Vector2(0.0, 0.0), Vector2(map_size.x, map_size.y))
|
||||
$water.update_bitmask_region(Vector2(0.0, 0.0), Vector2(map_size.x, map_size.y))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue