y order and level execution from menu
This commit is contained in:
parent
84396d8393
commit
1631bd87ce
5 changed files with 32 additions and 20 deletions
|
|
@ -833,7 +833,7 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="RightLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg"]
|
||||
position = Vector2(-2, 12)
|
||||
scale = Vector2(0.999837, 0.999837)
|
||||
scale = Vector2(0.999835, 0.999835)
|
||||
rest = Transform2D(1, 0, 0, 1, -2, 12)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
|
|
@ -862,7 +862,7 @@ metadata/_edit_lock_ = true
|
|||
[node name="LeftUpperLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"]
|
||||
use_parent_material = true
|
||||
position = Vector2(6, 4)
|
||||
scale = Vector2(0.99983, 0.99983)
|
||||
scale = Vector2(0.999831, 0.999831)
|
||||
rest = Transform2D(1, 0, 0, 1, 6, 4)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
|
|
@ -886,7 +886,7 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="LeftFoot" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg"]
|
||||
position = Vector2(6, 10)
|
||||
scale = Vector2(0.999827, 0.999827)
|
||||
scale = Vector2(0.999828, 0.999828)
|
||||
rest = Transform2D(1, 0, 0, 1, 6, 10)
|
||||
auto_calculate_length_and_angle = false
|
||||
length = 12.0
|
||||
|
|
@ -956,7 +956,7 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="Tie" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"]
|
||||
position = Vector2(-9, -21)
|
||||
rotation = 0.0104011
|
||||
rotation = -0.0224817
|
||||
skew = -0.000424862
|
||||
rest = Transform2D(1, 0, 0, 1, -9, -21)
|
||||
auto_calculate_length_and_angle = false
|
||||
|
|
@ -995,6 +995,7 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="Right_Eye" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"]
|
||||
position = Vector2(-16, -8)
|
||||
scale = Vector2(1, 1)
|
||||
texture = SubResource("AtlasTexture_vcc72")
|
||||
centered = false
|
||||
offset = Vector2(-2, -2)
|
||||
|
|
@ -1002,15 +1003,16 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="Left_Eye" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"]
|
||||
position = Vector2(-4, -9)
|
||||
scale = Vector2(1, 1)
|
||||
texture = SubResource("AtlasTexture_kto0i")
|
||||
centered = false
|
||||
offset = Vector2(-2, -2)
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Jaw" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"]
|
||||
position = Vector2(-3.00013, 2.99978)
|
||||
rotation = 0.00100939
|
||||
scale = Vector2(0.999832, 0.999832)
|
||||
position = Vector2(-2.69548, 2.26436)
|
||||
rotation = 0.0270693
|
||||
scale = Vector2(0.999831, 0.999831)
|
||||
texture = SubResource("AtlasTexture_x5uj2")
|
||||
centered = false
|
||||
offset = Vector2(-12, -2)
|
||||
|
|
@ -1083,7 +1085,7 @@ minTorque = -45.0
|
|||
maxTorque = 45.0
|
||||
|
||||
[node name="Left_Lower_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile"]
|
||||
rotation = 0.0097793
|
||||
rotation = 0.110272
|
||||
scale = Vector2(0.999998, 0.999998)
|
||||
texture = SubResource("AtlasTexture_auqeq")
|
||||
centered = false
|
||||
|
|
@ -1093,7 +1095,7 @@ metadata/_edit_lock_ = true
|
|||
[node name="Left_Hand" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm"]
|
||||
show_behind_parent = true
|
||||
position = Vector2(-0.99983, 12.9978)
|
||||
rotation = -0.00431598
|
||||
rotation = -0.115743
|
||||
scale = Vector2(0.999658, 0.999658)
|
||||
texture = SubResource("AtlasTexture_vlvtp")
|
||||
centered = false
|
||||
|
|
@ -1116,7 +1118,7 @@ editor_settings/show_bone_gizmo = false
|
|||
|
||||
[node name="LeftHand" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm"]
|
||||
position = Vector2(-1, 13)
|
||||
scale = Vector2(0.999827, 0.999827)
|
||||
scale = Vector2(0.999828, 0.999828)
|
||||
rest = Transform2D(1, 0, 0, 1, -1, 13)
|
||||
auto_calculate_length_and_angle = false
|
||||
length = 6.0
|
||||
|
|
@ -1166,6 +1168,7 @@ entity = NodePath("..")
|
|||
[node name="Mover" type="Node" parent="."]
|
||||
script = ExtResource("4_u5syx")
|
||||
_speed = SubResource("Resource_ckb7n")
|
||||
_speedControlMult = 2.31566
|
||||
|
||||
[node name="HitPlayer" type="Node" parent="."]
|
||||
script = ExtResource("12_he8da")
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ tracks/1/keys = {
|
|||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [0.0]
|
||||
"values": [1.0]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
|
|
@ -218,7 +218,7 @@ tracks/2/keys = {
|
|||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [1.0]
|
||||
"values": [2.0]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
|
|
@ -281,6 +281,8 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="ChooseYourSeeds" parent="GUI" index="0"]
|
||||
anchors_preset = -1
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 2.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
|
|
@ -326,6 +328,7 @@ approachNotificationTime = 5.0
|
|||
one_shot = true
|
||||
|
||||
[node name="ZombieLevelPrevewer" type="Node2D" parent="." index="16"]
|
||||
y_sort_enabled = true
|
||||
position = Vector2(855, 76)
|
||||
script = ExtResource("7_8ajos")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using Godot;
|
||||
using Newlon.Components.Level;
|
||||
|
||||
namespace Newlon;
|
||||
|
||||
|
|
@ -21,21 +22,24 @@ public partial class LevelController : Node
|
|||
{
|
||||
Instance = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="levelTileset">Scene that will be loaded</param>
|
||||
/// <param name="levelScript">Optional script that will be attached to loaded scene</param>
|
||||
public void StartLevel(PackedScene levelTileset, Script levelScript = null)
|
||||
/// <param name="levelResource">Execution of level</param>
|
||||
public void StartLevel(PackedScene levelTileset, AdventureLevelResource levelResource)
|
||||
{
|
||||
if (_isLevelRunning)
|
||||
return;
|
||||
|
||||
GetTree().ChangeSceneToPacked(levelTileset);
|
||||
GetTree().CreateTimer(0.001).Timeout += ()=>
|
||||
{
|
||||
RuntimeLevelData.Instance.levelResource = levelResource;
|
||||
RuntimeLevelData.Instance.StartLevel();
|
||||
};
|
||||
|
||||
if (levelScript != null)
|
||||
GetTree().CurrentScene.SetScript(levelScript);
|
||||
GetTree().ChangeSceneToPacked(levelTileset);
|
||||
|
||||
|
||||
_isLevelRunning = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ extends Node
|
|||
|
||||
|
||||
func _on_play_button_pressed() -> void:
|
||||
get_tree().change_scene_to_file("res://scenes/prototype_survival.tscn")
|
||||
LevelController.call("StartLevel",preload("uid://bu0dh5ct387xu"),preload("uid://br3364jty1j0i"))
|
||||
$ChannelPlayer.call("Play")
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,9 +36,11 @@ public partial class RuntimeLevelData : Node
|
|||
Instance = this;
|
||||
GetTree().Paused = true;
|
||||
Engine.TimeScale = 1.0;
|
||||
}
|
||||
public void StartLevel()
|
||||
{
|
||||
SetLevelState(LevelStates.ChooseYourSeeds);
|
||||
}
|
||||
|
||||
#region Sun
|
||||
public void AddSun(float amount)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue