complete refactor
This commit is contained in:
parent
65fe0e5c5d
commit
de2e8b1e50
71 changed files with 212 additions and 137 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using Godot.Collections;
|
using Godot.Collections;
|
||||||
|
using Newlon.Resources;
|
||||||
|
|
||||||
[GlobalClass]
|
[GlobalClass]
|
||||||
[Tool]
|
[Tool]
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using Godot.Collections;
|
using Godot.Collections;
|
||||||
|
using Newlon.Resources;
|
||||||
|
|
||||||
[Tool]
|
[Tool]
|
||||||
[GlobalClass]
|
[GlobalClass]
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
|
using Newlon.Resources;
|
||||||
|
|
||||||
|
|
||||||
[Tool]
|
[Tool]
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
|
using Newlon.Resources;
|
||||||
|
|
||||||
|
|
||||||
[Tool]
|
[Tool]
|
||||||
public partial class ZE_AssetBrowserButton : PanelContainer
|
public partial class ZE_AssetBrowserButton : PanelContainer
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
|
using Newlon.Resources;
|
||||||
|
|
||||||
|
|
||||||
[Tool]
|
[Tool]
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
|
using Newlon.Resources;
|
||||||
|
|
||||||
|
|
||||||
[Tool]
|
[Tool]
|
||||||
public partial class ZE_RowEditor : VBoxContainer
|
public partial class ZE_RowEditor : VBoxContainer
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
[ext_resource type="Script" uid="uid://cw7yc3i2lgcja" path="res://addons/pvzadventure/WaveEvent.cs" id="2_otfbt"]
|
[ext_resource type="Script" uid="uid://cw7yc3i2lgcja" path="res://addons/pvzadventure/WaveEvent.cs" id="2_otfbt"]
|
||||||
[ext_resource type="Script" uid="uid://7rptlb5qr3b6" path="res://addons/pvzadventure/WaveData.cs" id="3_cugtx"]
|
[ext_resource type="Script" uid="uid://7rptlb5qr3b6" path="res://addons/pvzadventure/WaveData.cs" id="3_cugtx"]
|
||||||
[ext_resource type="Script" uid="uid://dl12rj75tk2qi" path="res://addons/pvzadventure/RowSpawn.cs" id="4_y1e37"]
|
[ext_resource type="Script" uid="uid://dl12rj75tk2qi" path="res://addons/pvzadventure/RowSpawn.cs" id="4_y1e37"]
|
||||||
[ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/ZombieResource.cs" id="5_uatri"]
|
[ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/entities/ZombieResource.cs" id="5_uatri"]
|
||||||
[ext_resource type="Resource" uid="uid://buvacn56kyy2p" path="res://assets/zombies/basic.tres" id="6_qsvr4"]
|
[ext_resource type="Resource" uid="uid://buvacn56kyy2p" path="res://assets/zombies/basic.tres" id="6_qsvr4"]
|
||||||
[ext_resource type="Resource" uid="uid://nceohd32fkxk" path="res://assets/zombies/conehead.tres" id="7_qsvr4"]
|
[ext_resource type="Resource" uid="uid://nceohd32fkxk" path="res://assets/zombies/conehead.tres" id="7_qsvr4"]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
[ext_resource type="Script" uid="uid://cw7yc3i2lgcja" path="res://addons/pvzadventure/WaveEvent.cs" id="3_icaa5"]
|
[ext_resource type="Script" uid="uid://cw7yc3i2lgcja" path="res://addons/pvzadventure/WaveEvent.cs" id="3_icaa5"]
|
||||||
[ext_resource type="Script" uid="uid://7rptlb5qr3b6" path="res://addons/pvzadventure/WaveData.cs" id="4_kc7t2"]
|
[ext_resource type="Script" uid="uid://7rptlb5qr3b6" path="res://addons/pvzadventure/WaveData.cs" id="4_kc7t2"]
|
||||||
[ext_resource type="Script" uid="uid://dl12rj75tk2qi" path="res://addons/pvzadventure/RowSpawn.cs" id="5_66y5q"]
|
[ext_resource type="Script" uid="uid://dl12rj75tk2qi" path="res://addons/pvzadventure/RowSpawn.cs" id="5_66y5q"]
|
||||||
[ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/ZombieResource.cs" id="6_66y5q"]
|
[ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/entities/ZombieResource.cs" id="6_66y5q"]
|
||||||
[ext_resource type="Resource" uid="uid://buvacn56kyy2p" path="res://assets/zombies/basic.tres" id="7_c21si"]
|
[ext_resource type="Resource" uid="uid://buvacn56kyy2p" path="res://assets/zombies/basic.tres" id="7_c21si"]
|
||||||
[ext_resource type="Resource" uid="uid://nceohd32fkxk" path="res://assets/zombies/conehead.tres" id="8_c21si"]
|
[ext_resource type="Resource" uid="uid://nceohd32fkxk" path="res://assets/zombies/conehead.tres" id="8_c21si"]
|
||||||
[ext_resource type="Resource" uid="uid://dkhjlu7u0vny6" path="res://assets/zombies/buckethead.tres" id="9_tuvrx"]
|
[ext_resource type="Resource" uid="uid://dkhjlu7u0vny6" path="res://assets/zombies/buckethead.tres" id="9_tuvrx"]
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
[ext_resource type="Script" uid="uid://cw7yc3i2lgcja" path="res://addons/pvzadventure/WaveEvent.cs" id="2_pkoaj"]
|
[ext_resource type="Script" uid="uid://cw7yc3i2lgcja" path="res://addons/pvzadventure/WaveEvent.cs" id="2_pkoaj"]
|
||||||
[ext_resource type="Script" uid="uid://7rptlb5qr3b6" path="res://addons/pvzadventure/WaveData.cs" id="3_mtsmf"]
|
[ext_resource type="Script" uid="uid://7rptlb5qr3b6" path="res://addons/pvzadventure/WaveData.cs" id="3_mtsmf"]
|
||||||
[ext_resource type="Script" uid="uid://dl12rj75tk2qi" path="res://addons/pvzadventure/RowSpawn.cs" id="4_tpjav"]
|
[ext_resource type="Script" uid="uid://dl12rj75tk2qi" path="res://addons/pvzadventure/RowSpawn.cs" id="4_tpjav"]
|
||||||
[ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/ZombieResource.cs" id="5_tpjav"]
|
[ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/entities/ZombieResource.cs" id="5_tpjav"]
|
||||||
[ext_resource type="Resource" uid="uid://buvacn56kyy2p" path="res://assets/zombies/basic.tres" id="6_swlbc"]
|
[ext_resource type="Resource" uid="uid://buvacn56kyy2p" path="res://assets/zombies/basic.tres" id="6_swlbc"]
|
||||||
[ext_resource type="Resource" uid="uid://nceohd32fkxk" path="res://assets/zombies/conehead.tres" id="7_swlbc"]
|
[ext_resource type="Resource" uid="uid://nceohd32fkxk" path="res://assets/zombies/conehead.tres" id="7_swlbc"]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://bf7vjtufjc8kt"]
|
[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://bf7vjtufjc8kt"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://d4btl7vqi4v0q" path="res://assets/sprites/plants/aloe.tres" id="1_t4137"]
|
[ext_resource type="Texture2D" uid="uid://d4btl7vqi4v0q" path="res://assets/sprites/plants/aloe.tres" id="1_t4137"]
|
||||||
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/PlantResource.cs" id="1_vw2kg"]
|
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/entities/PlantResource.cs" id="1_vw2kg"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bw1w8jp0yeypy" path="res://scenes/entities/plants/aloe.tscn" id="2_6a4ia"]
|
[ext_resource type="PackedScene" uid="uid://bw1w8jp0yeypy" path="res://scenes/entities/plants/aloe.tscn" id="2_6a4ia"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_vw2kg")
|
script = ExtResource("1_vw2kg")
|
||||||
name_key = "aloe"
|
NameKey = "aloe"
|
||||||
description_key = "aloe_desc"
|
DescriptionKey = "aloe_desc"
|
||||||
Cost = 75.0
|
Cost = 75.0
|
||||||
Scene = ExtResource("2_6a4ia")
|
Scene = ExtResource("2_6a4ia")
|
||||||
ReloadTime = 15.0
|
ReloadTime = 15.0
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[gd_resource type="Resource" script_class="PlantResource" load_steps=5 format=3 uid="uid://ciewunnfalrbb"]
|
[gd_resource type="Resource" script_class="PlantResource" load_steps=5 format=3 uid="uid://ciewunnfalrbb"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/PlantResource.cs" id="1_jrx81"]
|
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/entities/PlantResource.cs" id="1_jrx81"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bt76iudw2qgnv" path="res://assets/sprites/atlases/plants/cumbucer.png" id="1_tdg4d"]
|
[ext_resource type="Texture2D" uid="uid://bt76iudw2qgnv" path="res://assets/sprites/atlases/plants/cumbucer.png" id="1_tdg4d"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cjoyh54cpjla7" path="res://scenes/entities/plants/cucumber.tscn" id="2_0mr6r"]
|
[ext_resource type="PackedScene" uid="uid://cjoyh54cpjla7" path="res://scenes/entities/plants/cucumber.tscn" id="2_0mr6r"]
|
||||||
|
|
||||||
|
|
@ -10,8 +10,8 @@ region = Rect2(2, 1, 41, 65)
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_jrx81")
|
script = ExtResource("1_jrx81")
|
||||||
name_key = "cucumber"
|
NameKey = "cucumber"
|
||||||
description_key = "cucumber_desc"
|
DescriptionKey = "cucumber_desc"
|
||||||
Cost = 75.0
|
Cost = 75.0
|
||||||
Scene = ExtResource("2_0mr6r")
|
Scene = ExtResource("2_0mr6r")
|
||||||
ReloadTime = 5.0
|
ReloadTime = 5.0
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://btkkaow4tyw55"]
|
[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://btkkaow4tyw55"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://m8e84blnx7yu" path="res://assets/sprites/plants/garlic.tres" id="1_datic"]
|
[ext_resource type="Texture2D" uid="uid://m8e84blnx7yu" path="res://assets/sprites/plants/garlic.tres" id="1_datic"]
|
||||||
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/PlantResource.cs" id="1_e15gf"]
|
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/entities/PlantResource.cs" id="1_e15gf"]
|
||||||
[ext_resource type="PackedScene" uid="uid://qq0cw8xtcoj3" path="res://scenes/entities/plants/garlic.tscn" id="2_81n0p"]
|
[ext_resource type="PackedScene" uid="uid://qq0cw8xtcoj3" path="res://scenes/entities/plants/garlic.tscn" id="2_81n0p"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_e15gf")
|
script = ExtResource("1_e15gf")
|
||||||
name_key = "garlic"
|
NameKey = "garlic"
|
||||||
description_key = "garlic_desc"
|
DescriptionKey = "garlic_desc"
|
||||||
Cost = 50.0
|
Cost = 50.0
|
||||||
Scene = ExtResource("2_81n0p")
|
Scene = ExtResource("2_81n0p")
|
||||||
ReloadTime = 7.5
|
ReloadTime = 7.5
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://b06e8xhdy77d1" path="res://assets/sprites/atlases/plants/nerdus.png" id="1_of51r"]
|
[ext_resource type="Texture2D" uid="uid://b06e8xhdy77d1" path="res://assets/sprites/atlases/plants/nerdus.png" id="1_of51r"]
|
||||||
[ext_resource type="PackedScene" uid="uid://k5aj2slxar7w" path="res://scenes/entities/plants/nerdus.tscn" id="2_0i6qf"]
|
[ext_resource type="PackedScene" uid="uid://k5aj2slxar7w" path="res://scenes/entities/plants/nerdus.tscn" id="2_0i6qf"]
|
||||||
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/PlantResource.cs" id="3_30qd0"]
|
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/entities/PlantResource.cs" id="3_30qd0"]
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ivp5w"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ivp5w"]
|
||||||
atlas = ExtResource("1_of51r")
|
atlas = ExtResource("1_of51r")
|
||||||
|
|
@ -10,8 +10,8 @@ region = Rect2(477, 9, 60, 59)
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("3_30qd0")
|
script = ExtResource("3_30qd0")
|
||||||
name_key = "nerdus"
|
NameKey = "nerdus"
|
||||||
description_key = "nerdus_desc"
|
DescriptionKey = "nerdus_desc"
|
||||||
Cost = 125.0
|
Cost = 125.0
|
||||||
Scene = ExtResource("2_0i6qf")
|
Scene = ExtResource("2_0i6qf")
|
||||||
ReloadTime = 10.0
|
ReloadTime = 10.0
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://c8rr1dc7mjr3d"]
|
[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://c8rr1dc7mjr3d"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/PlantResource.cs" id="1_amvh8"]
|
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/entities/PlantResource.cs" id="1_amvh8"]
|
||||||
[ext_resource type="Texture2D" uid="uid://ot1n4nval86w" path="res://assets/sprites/plants/peashooter.tres" id="1_rnq6r"]
|
[ext_resource type="Texture2D" uid="uid://ot1n4nval86w" path="res://assets/sprites/plants/peashooter.tres" id="1_rnq6r"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dy41q1kxray5t" path="res://scenes/entities/plants/peashooter.tscn" id="1_rqf2x"]
|
[ext_resource type="PackedScene" uid="uid://dy41q1kxray5t" path="res://scenes/entities/plants/peashooter.tscn" id="1_rqf2x"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_amvh8")
|
script = ExtResource("1_amvh8")
|
||||||
name_key = "peashooter"
|
NameKey = "peashooter"
|
||||||
description_key = "peashooter_desc"
|
DescriptionKey = "peashooter_desc"
|
||||||
Cost = 75.0
|
Cost = 75.0
|
||||||
Scene = ExtResource("1_rqf2x")
|
Scene = ExtResource("1_rqf2x")
|
||||||
ReloadTime = 5.0
|
ReloadTime = 5.0
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://bu25xgjd68gv8"]
|
[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://bu25xgjd68gv8"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/PlantResource.cs" id="1_33j6b"]
|
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/entities/PlantResource.cs" id="1_33j6b"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bhmnt3x5aj1l8" path="res://assets/sprites/plants/potatomine.tres" id="1_xk2pg"]
|
[ext_resource type="Texture2D" uid="uid://bhmnt3x5aj1l8" path="res://assets/sprites/plants/potatomine.tres" id="1_xk2pg"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b5x35v3w2u8dx" path="res://scenes/entities/plants/potato_mine.tscn" id="2_ig2ti"]
|
[ext_resource type="PackedScene" uid="uid://b5x35v3w2u8dx" path="res://scenes/entities/plants/potato_mine.tscn" id="2_ig2ti"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_33j6b")
|
script = ExtResource("1_33j6b")
|
||||||
name_key = "potatomine"
|
NameKey = "potatomine"
|
||||||
description_key = "potatomine_desc"
|
DescriptionKey = "potatomine_desc"
|
||||||
Cost = 25.0
|
Cost = 25.0
|
||||||
Scene = ExtResource("2_ig2ti")
|
Scene = ExtResource("2_ig2ti")
|
||||||
ReloadTime = 25.0
|
ReloadTime = 25.0
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://duflq3eexs6m"]
|
[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://duflq3eexs6m"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/PlantResource.cs" id="1_0cpi0"]
|
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/entities/PlantResource.cs" id="1_0cpi0"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cu7h8bot6jlug" path="res://assets/sprites/plants/snowpea.tres" id="1_7fyy2"]
|
[ext_resource type="Texture2D" uid="uid://cu7h8bot6jlug" path="res://assets/sprites/plants/snowpea.tres" id="1_7fyy2"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b7innrovtmf5u" path="res://scenes/entities/plants/snowpea.tscn" id="2_k47h0"]
|
[ext_resource type="PackedScene" uid="uid://b7innrovtmf5u" path="res://scenes/entities/plants/snowpea.tscn" id="2_k47h0"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_0cpi0")
|
script = ExtResource("1_0cpi0")
|
||||||
name_key = "snowpea"
|
NameKey = "snowpea"
|
||||||
description_key = "snowpea_desc"
|
DescriptionKey = "snowpea_desc"
|
||||||
Cost = 175.0
|
Cost = 175.0
|
||||||
Scene = ExtResource("2_k47h0")
|
Scene = ExtResource("2_k47h0")
|
||||||
ReloadTime = 5.0
|
ReloadTime = 5.0
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://cas11tg6chiu4"]
|
[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://cas11tg6chiu4"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/PlantResource.cs" id="1_0bymo"]
|
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/entities/PlantResource.cs" id="1_0bymo"]
|
||||||
[ext_resource type="Texture2D" uid="uid://baqfahxkcvfe1" path="res://assets/sprites/plants/Spikeweed.tres" id="1_2ol2i"]
|
[ext_resource type="Texture2D" uid="uid://baqfahxkcvfe1" path="res://assets/sprites/plants/Spikeweed.tres" id="1_2ol2i"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bdhod5c6o53ha" path="res://scenes/entities/plants/spikeweed.tscn" id="2_iv8de"]
|
[ext_resource type="PackedScene" uid="uid://bdhod5c6o53ha" path="res://scenes/entities/plants/spikeweed.tscn" id="2_iv8de"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_0bymo")
|
script = ExtResource("1_0bymo")
|
||||||
name_key = "spikeweed"
|
NameKey = "spikeweed"
|
||||||
description_key = "spikeweed_desc"
|
DescriptionKey = "spikeweed_desc"
|
||||||
Cost = 100.0
|
Cost = 100.0
|
||||||
Scene = ExtResource("2_iv8de")
|
Scene = ExtResource("2_iv8de")
|
||||||
ReloadTime = 5.0
|
ReloadTime = 5.0
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://iw75j816gbc" path="res://assets/sprites/plants/sunflower.tres" id="1_8rd5i"]
|
[ext_resource type="Texture2D" uid="uid://iw75j816gbc" path="res://assets/sprites/plants/sunflower.tres" id="1_8rd5i"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bg7lomiorxo2c" path="res://scenes/entities/plants/sunflower.tscn" id="2_gcyr5"]
|
[ext_resource type="PackedScene" uid="uid://bg7lomiorxo2c" path="res://scenes/entities/plants/sunflower.tscn" id="2_gcyr5"]
|
||||||
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/PlantResource.cs" id="3_vt4jc"]
|
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/entities/PlantResource.cs" id="3_vt4jc"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("3_vt4jc")
|
script = ExtResource("3_vt4jc")
|
||||||
name_key = "sunflower"
|
NameKey = "sunflower"
|
||||||
description_key = "sunflower_desc"
|
DescriptionKey = "sunflower_desc"
|
||||||
Cost = 50.0
|
Cost = 50.0
|
||||||
Scene = ExtResource("2_gcyr5")
|
Scene = ExtResource("2_gcyr5")
|
||||||
ReloadTime = 5.0
|
ReloadTime = 5.0
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://8se1nscal0em" path="res://assets/sprites/plants/threepeater.tres" id="1_hinp6"]
|
[ext_resource type="Texture2D" uid="uid://8se1nscal0em" path="res://assets/sprites/plants/threepeater.tres" id="1_hinp6"]
|
||||||
[ext_resource type="PackedScene" uid="uid://eegv1qihfv2q" path="res://scenes/entities/plants/threepeater.tscn" id="2_uqpu0"]
|
[ext_resource type="PackedScene" uid="uid://eegv1qihfv2q" path="res://scenes/entities/plants/threepeater.tscn" id="2_uqpu0"]
|
||||||
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/PlantResource.cs" id="3_3lugi"]
|
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/entities/PlantResource.cs" id="3_3lugi"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("3_3lugi")
|
script = ExtResource("3_3lugi")
|
||||||
name_key = "threepeater"
|
NameKey = "threepeater"
|
||||||
description_key = "threepeater_desc"
|
DescriptionKey = "threepeater_desc"
|
||||||
Cost = 275.0
|
Cost = 275.0
|
||||||
Scene = ExtResource("2_uqpu0")
|
Scene = ExtResource("2_uqpu0")
|
||||||
ReloadTime = 5.0
|
ReloadTime = 5.0
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://c2e2yj7rgoswi"]
|
[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://c2e2yj7rgoswi"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://g2oppl54efja" path="res://assets/sprites/plants/Wallnut.tres" id="1_2akap"]
|
[ext_resource type="Texture2D" uid="uid://g2oppl54efja" path="res://assets/sprites/plants/Wallnut.tres" id="1_2akap"]
|
||||||
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/PlantResource.cs" id="1_27l0t"]
|
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/entities/PlantResource.cs" id="1_27l0t"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bq7imkpr2yqyr" path="res://scenes/entities/plants/wallnut.tscn" id="2_rkn3h"]
|
[ext_resource type="PackedScene" uid="uid://bq7imkpr2yqyr" path="res://scenes/entities/plants/wallnut.tscn" id="2_rkn3h"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_27l0t")
|
script = ExtResource("1_27l0t")
|
||||||
name_key = "wallnut"
|
NameKey = "wallnut"
|
||||||
description_key = "wallnut_desc"
|
DescriptionKey = "wallnut_desc"
|
||||||
Cost = 50.0
|
Cost = 50.0
|
||||||
Scene = ExtResource("2_rkn3h")
|
Scene = ExtResource("2_rkn3h")
|
||||||
ReloadTime = 20.0
|
ReloadTime = 20.0
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[gd_resource type="Resource" script_class="ZombieResource" load_steps=5 format=3 uid="uid://buvacn56kyy2p"]
|
[gd_resource type="Resource" script_class="ZombieResource" load_steps=5 format=3 uid="uid://buvacn56kyy2p"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://co11v3w8hbwgf" path="res://scenes/entities/Zombies/zombie.tscn" id="1_c2mq3"]
|
[ext_resource type="PackedScene" uid="uid://co11v3w8hbwgf" path="res://scenes/entities/Zombies/zombie.tscn" id="1_c2mq3"]
|
||||||
[ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/ZombieResource.cs" id="1_k277m"]
|
[ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/entities/ZombieResource.cs" id="1_k277m"]
|
||||||
[ext_resource type="Texture2D" uid="uid://5gpf2sodhn6e" path="res://assets/sprites/zombies/previews.png" id="1_l6de4"]
|
[ext_resource type="Texture2D" uid="uid://5gpf2sodhn6e" path="res://assets/sprites/zombies/previews.png" id="1_l6de4"]
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wu2q8"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_wu2q8"]
|
||||||
|
|
@ -10,8 +10,8 @@ region = Rect2(0, 0, 43, 88)
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_k277m")
|
script = ExtResource("1_k277m")
|
||||||
name_key = "basic"
|
NameKey = "basic"
|
||||||
description_key = "basic_desc"
|
DescriptionKey = "basic_desc"
|
||||||
Cost = 1.0
|
Cost = 1.0
|
||||||
Scene = ExtResource("1_c2mq3")
|
Scene = ExtResource("1_c2mq3")
|
||||||
ReloadTime = 1.0
|
ReloadTime = 1.0
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[gd_resource type="Resource" script_class="ZombieResource" load_steps=5 format=3 uid="uid://dkhjlu7u0vny6"]
|
[gd_resource type="Resource" script_class="ZombieResource" load_steps=5 format=3 uid="uid://dkhjlu7u0vny6"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://xu4i6tmkv00a" path="res://scenes/entities/Zombies/bucket_zombie.tscn" id="1_lhcag"]
|
[ext_resource type="PackedScene" uid="uid://xu4i6tmkv00a" path="res://scenes/entities/Zombies/bucket_zombie.tscn" id="1_lhcag"]
|
||||||
[ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/ZombieResource.cs" id="1_sngfh"]
|
[ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/entities/ZombieResource.cs" id="1_sngfh"]
|
||||||
[ext_resource type="Texture2D" uid="uid://5gpf2sodhn6e" path="res://assets/sprites/zombies/previews.png" id="1_ufs7s"]
|
[ext_resource type="Texture2D" uid="uid://5gpf2sodhn6e" path="res://assets/sprites/zombies/previews.png" id="1_ufs7s"]
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_drksh"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_drksh"]
|
||||||
|
|
@ -10,8 +10,8 @@ region = Rect2(137, 0, 47, 101)
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_sngfh")
|
script = ExtResource("1_sngfh")
|
||||||
name_key = "buckethead"
|
NameKey = "buckethead"
|
||||||
description_key = "buckethead_desc"
|
DescriptionKey = "buckethead_desc"
|
||||||
Cost = 5.0
|
Cost = 5.0
|
||||||
Scene = ExtResource("1_lhcag")
|
Scene = ExtResource("1_lhcag")
|
||||||
ReloadTime = 1.0
|
ReloadTime = 1.0
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://5gpf2sodhn6e" path="res://assets/sprites/zombies/previews.png" id="1_f7g7v"]
|
[ext_resource type="Texture2D" uid="uid://5gpf2sodhn6e" path="res://assets/sprites/zombies/previews.png" id="1_f7g7v"]
|
||||||
[ext_resource type="PackedScene" uid="uid://hhjbqkjqpt7x" path="res://scenes/entities/Zombies/cone_zombie.tscn" id="1_llf5l"]
|
[ext_resource type="PackedScene" uid="uid://hhjbqkjqpt7x" path="res://scenes/entities/Zombies/cone_zombie.tscn" id="1_llf5l"]
|
||||||
[ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/ZombieResource.cs" id="1_sw7hj"]
|
[ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/entities/ZombieResource.cs" id="1_sw7hj"]
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_q44xp"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_q44xp"]
|
||||||
atlas = ExtResource("1_f7g7v")
|
atlas = ExtResource("1_f7g7v")
|
||||||
|
|
@ -10,8 +10,8 @@ region = Rect2(92, 0, 45, 106)
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_sw7hj")
|
script = ExtResource("1_sw7hj")
|
||||||
name_key = "conehead"
|
NameKey = "conehead"
|
||||||
description_key = "conehead_desc"
|
DescriptionKey = "conehead_desc"
|
||||||
Cost = 2.0
|
Cost = 2.0
|
||||||
Scene = ExtResource("1_llf5l")
|
Scene = ExtResource("1_llf5l")
|
||||||
ReloadTime = 1.0
|
ReloadTime = 1.0
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bgqmwsb6ynm81" path="res://scenes/entities/Zombies/hobo.tscn" id="1_4myt6"]
|
[ext_resource type="PackedScene" uid="uid://bgqmwsb6ynm81" path="res://scenes/entities/Zombies/hobo.tscn" id="1_4myt6"]
|
||||||
[ext_resource type="Texture2D" uid="uid://5gpf2sodhn6e" path="res://assets/sprites/zombies/previews.png" id="1_nt7w3"]
|
[ext_resource type="Texture2D" uid="uid://5gpf2sodhn6e" path="res://assets/sprites/zombies/previews.png" id="1_nt7w3"]
|
||||||
[ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/ZombieResource.cs" id="1_u5qpq"]
|
[ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/entities/ZombieResource.cs" id="1_u5qpq"]
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_73ahc"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_73ahc"]
|
||||||
atlas = ExtResource("1_nt7w3")
|
atlas = ExtResource("1_nt7w3")
|
||||||
|
|
@ -10,8 +10,8 @@ region = Rect2(43, 0, 49, 95)
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_u5qpq")
|
script = ExtResource("1_u5qpq")
|
||||||
name_key = "hobo"
|
NameKey = "hobo"
|
||||||
description_key = "hobo_desc"
|
DescriptionKey = "hobo_desc"
|
||||||
Cost = 7.0
|
Cost = 7.0
|
||||||
Scene = ExtResource("1_4myt6")
|
Scene = ExtResource("1_4myt6")
|
||||||
ReloadTime = 1.0
|
ReloadTime = 1.0
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[gd_scene load_steps=15 format=3 uid="uid://bpekho7leatr5"]
|
[gd_scene load_steps=15 format=3 uid="uid://bpekho7leatr5"]
|
||||||
|
|
||||||
[ext_resource type="Shader" uid="uid://bk8uy5se3fo0" path="res://assets/shaders/shared_outline.gdshader" id="1_jcu1f"]
|
[ext_resource type="Shader" uid="uid://bk8uy5se3fo0" path="res://assets/shaders/shared_outline.gdshader" id="1_jcu1f"]
|
||||||
[ext_resource type="Script" uid="uid://qgeovvluk8yj" path="res://scripts/Sun.cs" id="2_m8xcj"]
|
[ext_resource type="Script" uid="uid://qgeovvluk8yj" path="res://scripts/projectiles/Sun.cs" id="2_m8xcj"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bkmphus5wjadi" path="res://assets/sprites/atlases/sun_atlas.png" id="2_phn3y"]
|
[ext_resource type="Texture2D" uid="uid://bkmphus5wjadi" path="res://assets/sprites/atlases/sun_atlas.png" id="2_phn3y"]
|
||||||
[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="4_t1pnj"]
|
[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="4_t1pnj"]
|
||||||
[ext_resource type="AudioStream" uid="uid://c0cq80nvld37p" path="res://assets/audio/sfx/sun.mp3" id="5_i8fpp"]
|
[ext_resource type="AudioStream" uid="uid://c0cq80nvld37p" path="res://assets/audio/sfx/sun.mp3" id="5_i8fpp"]
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace Newlon;
|
namespace Newlon;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using Godot.Collections;
|
|
||||||
using Newlon;
|
using Newlon.Resources;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Newlon;
|
||||||
|
|
||||||
public partial class SaveSerializer : Node
|
public partial class SaveSerializer : Node
|
||||||
{
|
{
|
||||||
const string SAVE_PATH = "user://save.json";
|
const string SAVE_PATH = "user://save.json";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
|
namespace Newlon.Components.Droppables;
|
||||||
|
|
||||||
public partial class DropMover : Node
|
public partial class DropMover : Node
|
||||||
{
|
{
|
||||||
public float ySpeed = -200.0f;
|
public float ySpeed = -200.0f;
|
||||||
|
|
@ -16,7 +18,7 @@ public partial class DropMover : Node
|
||||||
stop_y = ((parent.GlobalPosition / FieldParams.Tile).Ceil() * FieldParams.Tile).Y;
|
stop_y = ((parent.GlobalPosition / FieldParams.Tile).Ceil() * FieldParams.Tile).Y;
|
||||||
gravity = (float)ProjectSettings.GetSetting("physics/2d/default_gravity");
|
gravity = (float)ProjectSettings.GetSetting("physics/2d/default_gravity");
|
||||||
|
|
||||||
velocity = new Vector2((GD.Randf()-0.5f)*xSpeed,ySpeed);
|
velocity = new Vector2((GD.Randf() - 0.5f) * xSpeed, ySpeed);
|
||||||
}
|
}
|
||||||
public override void _Process(double delta)
|
public override void _Process(double delta)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
|
namespace Newlon.Components.Droppables;
|
||||||
|
|
||||||
[GlobalClass]
|
[GlobalClass]
|
||||||
public partial class DroppableItem : Area2D
|
public partial class DroppableItem : Area2D
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using Newlon;
|
using Newlon.Resources;
|
||||||
|
|
||||||
|
namespace Newlon.Components.Droppables;
|
||||||
|
|
||||||
public partial class DroppableSeedpacket : DroppableItem
|
public partial class DroppableSeedpacket : DroppableItem
|
||||||
{
|
{
|
||||||
|
|
@ -11,10 +13,10 @@ public partial class DroppableSeedpacket : DroppableItem
|
||||||
{
|
{
|
||||||
_cost.Text = plant.Cost.ToString();
|
_cost.Text = plant.Cost.ToString();
|
||||||
_icon.Texture = plant.Preview;
|
_icon.Texture = plant.Preview;
|
||||||
if (plant.customFrame != null)
|
if (plant.CustomFrame != null)
|
||||||
{
|
{
|
||||||
_packet.Texture = plant.customFrame.frame;
|
_packet.Texture = plant.CustomFrame.frame;
|
||||||
_cost.LabelSettings = plant.customFrame.font;
|
_cost.LabelSettings = plant.CustomFrame.font;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
|
using Newlon.Projectiles;
|
||||||
using Newlon.Components.Level;
|
using Newlon.Components.Level;
|
||||||
|
using Newlon.Components.Droppables;
|
||||||
|
|
||||||
namespace Newlon.Components.Plants;
|
namespace Newlon.Components.Plants;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using Newlon.Components.Level;
|
using Newlon.Components.Level;
|
||||||
|
using Newlon.Resources;
|
||||||
|
|
||||||
namespace Newlon.Components.Plants;
|
namespace Newlon.Components.Plants;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using Newlon.Components.Level;
|
using Newlon.Components.Level;
|
||||||
using System;
|
using Newlon;
|
||||||
|
|
||||||
public partial class PlantHotbarSize : PanelContainer
|
public partial class PlantHotbarSize : PanelContainer
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using Newlon;
|
using Newlon;
|
||||||
using Newlon.Components;
|
using Newlon.Components;
|
||||||
using Newlon.Components.Plants;
|
using Newlon.Resources;
|
||||||
|
|
||||||
public partial class RewardScene : Node
|
public partial class RewardScene : Node
|
||||||
{
|
{
|
||||||
|
|
@ -18,9 +18,9 @@ public partial class RewardScene : Node
|
||||||
descriptionLabel.Text = Tr(reward.Description);
|
descriptionLabel.Text = Tr(reward.Description);
|
||||||
continueButton.Pressed += LevelController.Instance.ReturnToInitiator;
|
continueButton.Pressed += LevelController.Instance.ReturnToInitiator;
|
||||||
|
|
||||||
if (reward is PlantReward plantReward && plantReward.Plant.customFrame != null)
|
if (reward is PlantReward plantReward && plantReward.Plant.CustomFrame != null)
|
||||||
{
|
{
|
||||||
field.Texture = plantReward.Plant.customFrame.almanachField;
|
field.Texture = plantReward.Plant.CustomFrame.almanachField;
|
||||||
}
|
}
|
||||||
|
|
||||||
var rewardedObject = reward.GetPreview().Instantiate();
|
var rewardedObject = reward.GetPreview().Instantiate();
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using Newlon.Components.Zombies;
|
using Newlon.Components.Zombies;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Newlon.Resources;
|
||||||
|
|
||||||
namespace Newlon.Components.Level;
|
namespace Newlon.Components.Level;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
|
using Newlon;
|
||||||
using Newlon.Components.GUI.Seedpackets;
|
using Newlon.Components.GUI.Seedpackets;
|
||||||
|
|
||||||
public partial class AlmanachGrid : GridContainer
|
public partial class AlmanachGrid : GridContainer
|
||||||
|
|
@ -20,7 +21,7 @@ public partial class AlmanachGrid : GridContainer
|
||||||
Seedpacket slot = _plantCard.Instantiate<Seedpacket>();
|
Seedpacket slot = _plantCard.Instantiate<Seedpacket>();
|
||||||
AddChild(slot);
|
AddChild(slot);
|
||||||
|
|
||||||
slot.SetResource(resource);
|
slot.SetResource(resource.ToGridEntity());
|
||||||
slot.SetHandler(new AlmanachHandler(slot));
|
slot.SetHandler(new AlmanachHandler(slot));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,15 +33,15 @@ public partial class Previewport : SubViewport
|
||||||
{
|
{
|
||||||
current_display.QueueFree();
|
current_display.QueueFree();
|
||||||
}
|
}
|
||||||
if (resource.customFrame != null && resource.customFrame.almanachField != null)
|
if (resource.CustomFrame != null && resource.CustomFrame.almanachField != null)
|
||||||
{
|
{
|
||||||
_frameField.Texture = resource.customFrame.almanachField;
|
_frameField.Texture = resource.CustomFrame.almanachField;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_frameField.Texture = start_Field;
|
_frameField.Texture = start_Field;
|
||||||
current_display = resource.Scene.Instantiate();
|
current_display = resource.Scene.Instantiate();
|
||||||
title.Text = Tr(resource.name_key);
|
title.Text = Tr(resource.NameKey);
|
||||||
description.Text = Tr("rwd_"+resource.name_key)+"\n"+ Tr(resource.description_key);
|
description.Text = Tr("rwd_"+resource.NameKey)+"\n"+ Tr(resource.DescriptionKey);
|
||||||
AddChild(current_display);
|
AddChild(current_display);
|
||||||
if (current_display is Entity entity)
|
if (current_display is Entity entity)
|
||||||
entity.DisableBrain();
|
entity.DisableBrain();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
|
using Newlon.Resources;
|
||||||
|
|
||||||
namespace Newlon.Components.GUI.Seedpackets;
|
namespace Newlon.Components.GUI.Seedpackets;
|
||||||
|
|
||||||
|
|
@ -8,7 +9,7 @@ public partial class Seedpacket : TextureButton
|
||||||
public static AudioStream UntapStream = ResourceLoader.Load<AudioStream>("res://assets/audio/gui/tap2.mp3");
|
public static AudioStream UntapStream = ResourceLoader.Load<AudioStream>("res://assets/audio/gui/tap2.mp3");
|
||||||
public static AudioStream LiftStream = ResourceLoader.Load<AudioStream>("res://assets/audio/gui/seedlift.mp3");
|
public static AudioStream LiftStream = ResourceLoader.Load<AudioStream>("res://assets/audio/gui/seedlift.mp3");
|
||||||
private const string PATH_TO_PACKED_SCENE = "res://scenes/gui/seedpacket.tscn";
|
private const string PATH_TO_PACKED_SCENE = "res://scenes/gui/seedpacket.tscn";
|
||||||
private EntityResource _resource;
|
private GridEntityResource _resource;
|
||||||
private Label _cost;
|
private Label _cost;
|
||||||
private TextureRect _icon;
|
private TextureRect _icon;
|
||||||
private Timer _timer;
|
private Timer _timer;
|
||||||
|
|
@ -46,14 +47,14 @@ public partial class Seedpacket : TextureButton
|
||||||
}
|
}
|
||||||
if (_handler is ISeedpacketProcess processHandler) processHandler.Process();
|
if (_handler is ISeedpacketProcess processHandler) processHandler.Process();
|
||||||
}
|
}
|
||||||
public void SetResource(EntityResource resource)
|
public void SetResource(GridEntityResource resource)
|
||||||
{
|
{
|
||||||
_resource = resource;
|
_resource = resource;
|
||||||
|
|
||||||
UpdateContents();
|
UpdateContents();
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityResource GetResource()
|
public GridEntityResource GetResource()
|
||||||
{
|
{
|
||||||
return _resource;
|
return _resource;
|
||||||
}
|
}
|
||||||
|
|
@ -69,10 +70,10 @@ public partial class Seedpacket : TextureButton
|
||||||
_cost.Text = _resource.Cost.ToString();
|
_cost.Text = _resource.Cost.ToString();
|
||||||
_icon.Texture = _resource.Preview;
|
_icon.Texture = _resource.Preview;
|
||||||
_timer.WaitTime = _resource.ReloadTime;
|
_timer.WaitTime = _resource.ReloadTime;
|
||||||
if (_resource.customFrame != null)
|
if (_resource.CustomFrame != null)
|
||||||
{
|
{
|
||||||
TextureNormal = _resource.customFrame.frame;
|
TextureNormal = _resource.CustomFrame.frame;
|
||||||
_cost.LabelSettings = _resource.customFrame.font;
|
_cost.LabelSettings = _resource.CustomFrame.font;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using Newlon;
|
using Newlon;
|
||||||
|
using Newlon.Resources;
|
||||||
using Newlon.Components;
|
using Newlon.Components;
|
||||||
using Newlon.Components.Level;
|
using Newlon.Components.Level;
|
||||||
using Newlon.Components.Plants;
|
using Newlon.Components.Plants;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using Newlon.Components.Level;
|
using Newlon.Components.Level;
|
||||||
|
using Newlon.Resources;
|
||||||
|
|
||||||
namespace Newlon;
|
namespace Newlon;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using Newlon.Components.Zombies;
|
using Newlon.Components.Zombies;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Newlon.Resources;
|
||||||
|
using Newlon.Components.Droppables;
|
||||||
|
|
||||||
namespace Newlon.Components.Level;
|
namespace Newlon.Components.Level;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,19 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using Newlon.Components.GUI.Seedpackets;
|
using Newlon.Components.GUI.Seedpackets;
|
||||||
using Newlon.Components.Plants;
|
using Newlon.Components.Plants;
|
||||||
|
using Newlon.Resources;
|
||||||
|
|
||||||
namespace Newlon.Components.Level;
|
namespace Newlon.Components.Level;
|
||||||
|
|
||||||
public partial class PlantField : Node2D
|
public partial class PlantField : Node2D
|
||||||
{
|
{
|
||||||
private Node2D _plantSetter;
|
private Node2D _plantSetter;
|
||||||
private EntityResource _resource;
|
private GridEntityResource _resource;
|
||||||
private Seedpacket _slot;
|
private Seedpacket _slot;
|
||||||
private bool _previousCanPlace;
|
private bool _previousCanPlace;
|
||||||
private ChannelPlayer player;
|
private ChannelPlayer player;
|
||||||
[Export] private PackedScene particles;
|
[Export] private PackedScene particles;
|
||||||
public static PlantField Instance {get; private set;}
|
public static PlantField Instance { get; private set; }
|
||||||
|
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
|
|
@ -21,13 +22,13 @@ public partial class PlantField : Node2D
|
||||||
player = GetNode<ChannelPlayer>("PlantPlayer");
|
player = GetNode<ChannelPlayer>("PlantPlayer");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetPlant(Seedpacket slot, EntityResource resource)
|
public void SetPlant(Seedpacket slot, GridEntityResource resource)
|
||||||
{
|
{
|
||||||
_resource = resource;
|
_resource = resource;
|
||||||
_slot = slot;
|
_slot = slot;
|
||||||
if (resource == null)
|
if (resource == null)
|
||||||
{
|
{
|
||||||
foreach(var child in _plantSetter.GetChildren())
|
foreach (var child in _plantSetter.GetChildren())
|
||||||
child.QueueFree();
|
child.QueueFree();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -40,7 +41,7 @@ public partial class PlantField : Node2D
|
||||||
|
|
||||||
public void ResetPlant()
|
public void ResetPlant()
|
||||||
{
|
{
|
||||||
SetPlant(null,null);
|
SetPlant(null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void _Process(double delta)
|
public override void _Process(double delta)
|
||||||
|
|
@ -99,7 +100,7 @@ public partial class PlantField : Node2D
|
||||||
|
|
||||||
RuntimeLevelData.Instance.SpendSun((int)_resource.Cost);
|
RuntimeLevelData.Instance.SpendSun((int)_resource.Cost);
|
||||||
|
|
||||||
PoolContainer.Instance.SpawnParticles(particles, plant.GlobalPosition + Vector2.Down * FieldParams.TileHeight/2.0f);
|
PoolContainer.Instance.SpawnParticles(particles, plant.GlobalPosition + Vector2.Down * FieldParams.TileHeight / 2.0f);
|
||||||
|
|
||||||
player.Play();
|
player.Play();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Newlon.Particles;
|
||||||
|
|
||||||
namespace Newlon.Components.Level;
|
namespace Newlon.Components.Level;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
|
using Newlon.Projectiles;
|
||||||
|
|
||||||
namespace Newlon.Components.Level;
|
namespace Newlon.Components.Level;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ using Godot;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Newlon.Components.Zombies;
|
using Newlon.Components.Zombies;
|
||||||
using Godot.Collections;
|
using Godot.Collections;
|
||||||
|
using Newlon.Resources;
|
||||||
|
|
||||||
namespace Newlon.Components.Level;
|
namespace Newlon.Components.Level;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Godot;
|
using Godot;
|
||||||
using Godot.Collections;
|
using Godot.Collections;
|
||||||
|
using Newlon;
|
||||||
|
using Newlon.Resources;
|
||||||
|
|
||||||
public partial class SurvivalZombieSpawner : Node
|
public partial class SurvivalZombieSpawner : Node
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ using System;
|
||||||
using Godot;
|
using Godot;
|
||||||
using Godot.Collections;
|
using Godot.Collections;
|
||||||
|
|
||||||
|
namespace Newlon.Particles;
|
||||||
|
|
||||||
public partial class FallFloor : Node2D
|
public partial class FallFloor : Node2D
|
||||||
{
|
{
|
||||||
private static FallFloor Instance;
|
private static FallFloor Instance;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ using Godot;
|
||||||
using Newlon.Components.Level;
|
using Newlon.Components.Level;
|
||||||
using Newlon.Components.Zombies;
|
using Newlon.Components.Zombies;
|
||||||
|
|
||||||
namespace Newlon.Components;
|
namespace Newlon.Particles;
|
||||||
|
|
||||||
[GlobalClass]
|
[GlobalClass]
|
||||||
public partial class FallParticle : RigidBody2D
|
public partial class FallParticle : RigidBody2D
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
|
namespace Newlon.Particles;
|
||||||
|
|
||||||
public partial class StandardParticles : Node2D
|
public partial class StandardParticles : Node2D
|
||||||
{
|
{
|
||||||
private int counter = 0;
|
private int counter = 0;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Newlon.Components;
|
namespace Newlon.Projectiles;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Base interface for entities
|
// Base interface for entities
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using Newlon.Components.Level;
|
using Newlon.Components.Level;
|
||||||
using Newlon.Systems.Effects;
|
using Newlon.Systems.Effects;
|
||||||
|
using Newlon.Components;
|
||||||
|
|
||||||
namespace Newlon.Components;
|
namespace Newlon.Projectiles;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Projectile that travels from left to right
|
// Projectile that travels from left to right
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ using Newlon.Components.GUI;
|
||||||
using Newlon.Components.Level;
|
using Newlon.Components.Level;
|
||||||
|
|
||||||
|
|
||||||
namespace Newlon;
|
namespace Newlon.Projectiles;
|
||||||
|
|
||||||
public partial class Sun : Area2D
|
public partial class Sun : Area2D
|
||||||
{
|
{
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
using Godot;
|
|
||||||
|
|
||||||
[Tool]
|
|
||||||
public partial class EntityResource : Resource
|
|
||||||
{
|
|
||||||
[Export] public string name_key;
|
|
||||||
[Export] public string description_key;
|
|
||||||
[Export]
|
|
||||||
public float Cost;
|
|
||||||
[Export]
|
|
||||||
public PackedScene Scene;
|
|
||||||
[Export]
|
|
||||||
public float ReloadTime;
|
|
||||||
[Export(PropertyHint.Range, "0,1,0.01")]
|
|
||||||
public float ReloadProgress;
|
|
||||||
[Export]
|
|
||||||
public Texture2D Preview;
|
|
||||||
[Export] public CustomSeedpacketFrame customFrame;
|
|
||||||
[Export] public int Layer = 1;
|
|
||||||
[Export] public int Order = 0;
|
|
||||||
public string internal_id;
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
|
namespace Newlon.Resources;
|
||||||
|
|
||||||
[GlobalClass]
|
[GlobalClass]
|
||||||
[Tool]
|
[Tool]
|
||||||
public partial class MoneyReward : RewardResource
|
public partial class MoneyReward : RewardResource
|
||||||
|
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
using Godot;
|
|
||||||
|
|
||||||
namespace Newlon;
|
|
||||||
|
|
||||||
[GlobalClass]
|
|
||||||
[Tool]
|
|
||||||
public partial class PlantResource : EntityResource
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using Newlon;
|
|
||||||
|
namespace Newlon.Resources;
|
||||||
|
|
||||||
[GlobalClass]
|
[GlobalClass]
|
||||||
[Tool]
|
[Tool]
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
|
namespace Newlon.Resources;
|
||||||
|
|
||||||
[GlobalClass]
|
[GlobalClass]
|
||||||
[Tool]
|
[Tool]
|
||||||
public abstract partial class RewardResource : Resource
|
public abstract partial class RewardResource : Resource
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
using Godot;
|
|
||||||
|
|
||||||
[GlobalClass]
|
|
||||||
[Tool]
|
|
||||||
public partial class ZombieResource : EntityResource
|
|
||||||
{
|
|
||||||
}
|
|
||||||
16
scripts/resources/entities/EntityResource.cs
Normal file
16
scripts/resources/entities/EntityResource.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
[Tool]
|
||||||
|
public partial class EntityResource : Resource
|
||||||
|
{
|
||||||
|
[Export] public string NameKey;
|
||||||
|
[Export] public string DescriptionKey;
|
||||||
|
[Export] public float Cost;
|
||||||
|
[Export] public PackedScene Scene;
|
||||||
|
[Export] public float ReloadTime;
|
||||||
|
[Export(PropertyHint.Range, "0,1,0.01")] public float ReloadProgress;
|
||||||
|
[Export] public Texture2D Preview;
|
||||||
|
[Export] public CustomSeedpacketFrame CustomFrame;
|
||||||
|
[Export] public int Order = 0;
|
||||||
|
public string internal_id;
|
||||||
|
}
|
||||||
11
scripts/resources/entities/GridEntityResource.cs
Normal file
11
scripts/resources/entities/GridEntityResource.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Newlon.Resources;
|
||||||
|
|
||||||
|
[GlobalClass]
|
||||||
|
[Tool]
|
||||||
|
public partial class GridEntityResource : EntityResource
|
||||||
|
{
|
||||||
|
[Export] public int Layer = 1;
|
||||||
|
[Export] public bool DontRegister = false;
|
||||||
|
}
|
||||||
1
scripts/resources/entities/GridEntityResource.cs.uid
Normal file
1
scripts/resources/entities/GridEntityResource.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bwjyra0xvhde5
|
||||||
9
scripts/resources/entities/PlantResource.cs
Normal file
9
scripts/resources/entities/PlantResource.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Newlon.Resources;
|
||||||
|
|
||||||
|
[GlobalClass]
|
||||||
|
[Tool]
|
||||||
|
public partial class PlantResource : GridEntityResource
|
||||||
|
{
|
||||||
|
}
|
||||||
28
scripts/resources/entities/ZombieResource.cs
Normal file
28
scripts/resources/entities/ZombieResource.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Newlon.Resources;
|
||||||
|
|
||||||
|
[GlobalClass]
|
||||||
|
[Tool]
|
||||||
|
public partial class ZombieResource : EntityResource
|
||||||
|
{
|
||||||
|
public GridEntityResource ToGridEntity()
|
||||||
|
{
|
||||||
|
GridEntityResource result = new();
|
||||||
|
|
||||||
|
result.NameKey = NameKey;
|
||||||
|
result.DescriptionKey = DescriptionKey;
|
||||||
|
result.Cost = Cost;
|
||||||
|
result.Scene = Scene;
|
||||||
|
result.ReloadTime = ReloadTime;
|
||||||
|
result.ReloadProgress = ReloadProgress;
|
||||||
|
result.Preview = Preview;
|
||||||
|
result.CustomFrame = CustomFrame;
|
||||||
|
result.Order = Order;
|
||||||
|
|
||||||
|
result.Layer = 1;
|
||||||
|
result.DontRegister = true;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using Newlon;
|
using Newlon.Resources;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Newlon;
|
||||||
|
|
||||||
public partial class GameRegistry : Node
|
public partial class GameRegistry : Node
|
||||||
{
|
{
|
||||||
private const string PLANT_RESOURCE_PATH = "res://assets/plants/";
|
private const string PLANT_RESOURCE_PATH = "res://assets/plants/";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
|
namespace Newlon;
|
||||||
|
|
||||||
public class FieldParams
|
public class FieldParams
|
||||||
{
|
{
|
||||||
public const int TileWidth = 50;
|
public const int TileWidth = 50;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Godot;
|
using Godot;
|
||||||
using Newlon;
|
using Newlon.Resources;
|
||||||
|
|
||||||
|
namespace Newlon;
|
||||||
|
|
||||||
public partial class PlayerProgress : Node
|
public partial class PlayerProgress : Node
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using Godot;
|
using Godot;
|
||||||
using System;
|
|
||||||
|
namespace Newlon;
|
||||||
|
|
||||||
public partial class Settings : Node
|
public partial class Settings : Node
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue