modification de la scène de cockpit et ajout de lien entre les scènes
This commit is contained in:
@@ -3,19 +3,20 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://02nuoqleo4yu"
|
||||
path="res://.godot/imported/rock_cristal_texture.png-c34612644dbfa24e49296bfe43df46c6.ctex"
|
||||
path.s3tc="res://.godot/imported/rock_cristal_texture.png-c34612644dbfa24e49296bfe43df46c6.s3tc.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://stages/terrain/region/assets/textures/rock_cristal_texture.png"
|
||||
dest_files=["res://.godot/imported/rock_cristal_texture.png-c34612644dbfa24e49296bfe43df46c6.ctex"]
|
||||
dest_files=["res://.godot/imported/rock_cristal_texture.png-c34612644dbfa24e49296bfe43df46c6.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
@@ -23,7 +24,7 @@ compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
@@ -37,4 +38,4 @@ process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
detect_3d/compress_to=0
|
||||
|
||||
@@ -15,7 +15,6 @@ entity_container = NodePath("Entities")
|
||||
|
||||
[node name="PassDay" parent="." unique_id=1144772570 instance=ExtResource("3_ktnx3")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
|
||||
[node name="RegionGui" type="CanvasLayer" parent="." unique_id=2024485651]
|
||||
layer = 2
|
||||
|
||||
@@ -35,6 +35,26 @@ var tile_set = Region.TILE_SET
|
||||
var generated_chunks : Dictionary[String,Chunk] = {}
|
||||
var generation_semaphore: Semaphore
|
||||
|
||||
# Cheat Code
|
||||
func _input(_e):
|
||||
if (
|
||||
Input.is_action_pressed("drop")
|
||||
and Input.is_action_pressed("move_right")
|
||||
and Input.is_action_pressed("move_left")
|
||||
and Input.is_action_just_pressed("action")
|
||||
):
|
||||
data.state = RegionData.State.SUCCEEDED
|
||||
data.update()
|
||||
|
||||
if (
|
||||
Input.is_action_pressed("drop")
|
||||
and Input.is_action_pressed("move_right")
|
||||
and Input.is_action_pressed("move_left")
|
||||
and Input.is_action_just_pressed("move_pointer")
|
||||
):
|
||||
data.charges = 0
|
||||
data.state = RegionData.State.FAILED
|
||||
|
||||
func _init():
|
||||
data = GameInfo.game_data.current_region_data
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ enum State {IN_PROGRESS,FAILED,SUCCEEDED}
|
||||
|
||||
signal plant_changing_score(p : PlantData, amount : int)
|
||||
signal updated(region_data : RegionData)
|
||||
signal failed
|
||||
signal succeded
|
||||
|
||||
signal pass_day_started(region_data : RegionData)
|
||||
signal pass_day_proceeded(region_data : RegionData)
|
||||
@@ -15,6 +17,7 @@ const DEFAULT_OBJECTIVE := 10
|
||||
|
||||
@export var region_seed : int
|
||||
@export var region_name : String
|
||||
@export var region_level : int = 0
|
||||
@export var day : int = 1
|
||||
@export var entities_saved_data : Array[EntityData] = []
|
||||
@export var score_by_plant : Dictionary[PlantData, int] = {}
|
||||
@@ -48,14 +51,21 @@ func _init(
|
||||
charges = parameter.charges
|
||||
objective = parameter.objective
|
||||
region_name = parameter.name
|
||||
region_level = parameter.level
|
||||
region_seed = parameter.region_seed
|
||||
|
||||
tutorial = parameter.tutorial
|
||||
|
||||
func update():
|
||||
if objective > 0 and get_score() >= objective:
|
||||
if state != State.SUCCEEDED:
|
||||
if tutorial:
|
||||
GameInfo.game_data.tutorial_done = true
|
||||
succeded.emit()
|
||||
state = State.SUCCEEDED
|
||||
if state != State.SUCCEEDED and charges == 0:
|
||||
if state != State.FAILED:
|
||||
failed.emit()
|
||||
state = State.FAILED
|
||||
updated.emit(self)
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ class_name RegionParameter
|
||||
@export var objective : int
|
||||
@export var name : String
|
||||
@export var tutorial : bool
|
||||
@export var level : int
|
||||
@export var region_seed : int
|
||||
|
||||
func _init(
|
||||
@@ -12,10 +13,12 @@ func _init(
|
||||
_objective : int = 10,
|
||||
_name = Random.generate_random_word(),
|
||||
_tutorial = false,
|
||||
_level = 0,
|
||||
_region_seed = randi(),
|
||||
):
|
||||
charges = _charges
|
||||
objective = _objective
|
||||
name = _name
|
||||
tutorial = _tutorial
|
||||
level = _level
|
||||
region_seed = _region_seed
|
||||
Reference in New Issue
Block a user