diff --git a/prototype/assets/buildings/buildings.png b/prototype/assets/buildings/buildings_blue.png similarity index 100% rename from prototype/assets/buildings/buildings.png rename to prototype/assets/buildings/buildings_blue.png diff --git a/prototype/assets/buildings/buildings_gray.png b/prototype/assets/buildings/buildings_gray.png new file mode 100644 index 00000000..52354f94 Binary files /dev/null and b/prototype/assets/buildings/buildings_gray.png differ diff --git a/prototype/assets/buildings/buildings_red.png b/prototype/assets/buildings/buildings_red.png new file mode 100644 index 00000000..66c05e81 Binary files /dev/null and b/prototype/assets/buildings/buildings_red.png differ diff --git a/prototype/assets/buildings/neutral.png b/prototype/assets/buildings/neutral_blue.png similarity index 100% rename from prototype/assets/buildings/neutral.png rename to prototype/assets/buildings/neutral_blue.png diff --git a/prototype/assets/buildings/neutral_gray.png b/prototype/assets/buildings/neutral_gray.png new file mode 100644 index 00000000..9b44d374 Binary files /dev/null and b/prototype/assets/buildings/neutral_gray.png differ diff --git a/prototype/assets/buildings/neutral_red.png b/prototype/assets/buildings/neutral_red.png new file mode 100644 index 00000000..f8b513ea Binary files /dev/null and b/prototype/assets/buildings/neutral_red.png differ diff --git a/prototype/assets/leaders/arthur.png b/prototype/assets/leaders/arthur_blue.png similarity index 100% rename from prototype/assets/leaders/arthur.png rename to prototype/assets/leaders/arthur_blue.png diff --git a/prototype/assets/leaders/arthur_red.png b/prototype/assets/leaders/arthur_red.png new file mode 100644 index 00000000..1160d340 Binary files /dev/null and b/prototype/assets/leaders/arthur_red.png differ diff --git a/prototype/assets/leaders/bokuden.png b/prototype/assets/leaders/bokuden_blue.png similarity index 100% rename from prototype/assets/leaders/bokuden.png rename to prototype/assets/leaders/bokuden_blue.png diff --git a/prototype/assets/leaders/bokuden_red.png b/prototype/assets/leaders/bokuden_red.png new file mode 100644 index 00000000..f7b0a4fd Binary files /dev/null and b/prototype/assets/leaders/bokuden_red.png differ diff --git a/prototype/assets/leaders/hongi.png b/prototype/assets/leaders/hongi_blue.png similarity index 100% rename from prototype/assets/leaders/hongi.png rename to prototype/assets/leaders/hongi_blue.png diff --git a/prototype/assets/leaders/hongi_red.png b/prototype/assets/leaders/hongi_red.png new file mode 100644 index 00000000..d2470064 Binary files /dev/null and b/prototype/assets/leaders/hongi_red.png differ diff --git a/prototype/assets/leaders/lorne.png b/prototype/assets/leaders/lorne.png deleted file mode 100644 index d4441f7d..00000000 Binary files a/prototype/assets/leaders/lorne.png and /dev/null differ diff --git a/prototype/assets/leaders/lorne_blue.png b/prototype/assets/leaders/lorne_blue.png new file mode 100644 index 00000000..e3fe5420 Binary files /dev/null and b/prototype/assets/leaders/lorne_blue.png differ diff --git a/prototype/assets/leaders/lorne_red.png b/prototype/assets/leaders/lorne_red.png new file mode 100644 index 00000000..0a43b0a5 Binary files /dev/null and b/prototype/assets/leaders/lorne_red.png differ diff --git a/prototype/assets/leaders/nagato.png b/prototype/assets/leaders/nagato_blue.png similarity index 100% rename from prototype/assets/leaders/nagato.png rename to prototype/assets/leaders/nagato_blue.png diff --git a/prototype/assets/leaders/nagato_red.png b/prototype/assets/leaders/nagato_red.png new file mode 100644 index 00000000..c4ef4c6f Binary files /dev/null and b/prototype/assets/leaders/nagato_red.png differ diff --git a/prototype/assets/leaders/osman.png b/prototype/assets/leaders/osman_blue.png similarity index 100% rename from prototype/assets/leaders/osman.png rename to prototype/assets/leaders/osman_blue.png diff --git a/prototype/assets/leaders/osman_red.png b/prototype/assets/leaders/osman_red.png new file mode 100644 index 00000000..532509c2 Binary files /dev/null and b/prototype/assets/leaders/osman_red.png differ diff --git a/prototype/assets/leaders/raja.png b/prototype/assets/leaders/raja_blue.png similarity index 100% rename from prototype/assets/leaders/raja.png rename to prototype/assets/leaders/raja_blue.png diff --git a/prototype/assets/leaders/raja_red.png b/prototype/assets/leaders/raja_red.png new file mode 100644 index 00000000..495dbc38 Binary files /dev/null and b/prototype/assets/leaders/raja_red.png differ diff --git a/prototype/assets/leaders/robin.png b/prototype/assets/leaders/robin_blue.png similarity index 100% rename from prototype/assets/leaders/robin.png rename to prototype/assets/leaders/robin_blue.png diff --git a/prototype/assets/leaders/robin_red.png b/prototype/assets/leaders/robin_red.png new file mode 100644 index 00000000..8373e519 Binary files /dev/null and b/prototype/assets/leaders/robin_red.png differ diff --git a/prototype/assets/leaders/rollo.png b/prototype/assets/leaders/rollo_blue.png similarity index 100% rename from prototype/assets/leaders/rollo.png rename to prototype/assets/leaders/rollo_blue.png diff --git a/prototype/assets/leaders/rollo_red.png b/prototype/assets/leaders/rollo_red.png new file mode 100644 index 00000000..80d0118e Binary files /dev/null and b/prototype/assets/leaders/rollo_red.png differ diff --git a/prototype/assets/leaders/sida.png b/prototype/assets/leaders/sida_blue.png similarity index 100% rename from prototype/assets/leaders/sida.png rename to prototype/assets/leaders/sida_blue.png diff --git a/prototype/assets/leaders/sida_red.png b/prototype/assets/leaders/sida_red.png new file mode 100644 index 00000000..5578dfb1 Binary files /dev/null and b/prototype/assets/leaders/sida_red.png differ diff --git a/prototype/assets/leaders/takoda.png b/prototype/assets/leaders/takoda_blue.png similarity index 100% rename from prototype/assets/leaders/takoda.png rename to prototype/assets/leaders/takoda_blue.png diff --git a/prototype/assets/leaders/takoda_red.png b/prototype/assets/leaders/takoda_red.png new file mode 100644 index 00000000..d95b4a32 Binary files /dev/null and b/prototype/assets/leaders/takoda_red.png differ diff --git a/prototype/assets/leaders/tomyris.png b/prototype/assets/leaders/tomyris_blue.png similarity index 100% rename from prototype/assets/leaders/tomyris.png rename to prototype/assets/leaders/tomyris_blue.png diff --git a/prototype/assets/leaders/tomyris_red.png b/prototype/assets/leaders/tomyris_red.png new file mode 100644 index 00000000..2925fc35 Binary files /dev/null and b/prototype/assets/leaders/tomyris_red.png differ diff --git a/prototype/assets/map/light.png b/prototype/assets/map/light.png new file mode 100644 index 00000000..10ad4851 Binary files /dev/null and b/prototype/assets/map/light.png differ diff --git a/prototype/assets/pawns/archer.png b/prototype/assets/pawns/archer_blue.png similarity index 100% rename from prototype/assets/pawns/archer.png rename to prototype/assets/pawns/archer_blue.png diff --git a/prototype/assets/pawns/archer_red.png b/prototype/assets/pawns/archer_red.png new file mode 100644 index 00000000..df5c395b Binary files /dev/null and b/prototype/assets/pawns/archer_red.png differ diff --git a/prototype/assets/pawns/infantry.png b/prototype/assets/pawns/infantry_blue.png similarity index 100% rename from prototype/assets/pawns/infantry.png rename to prototype/assets/pawns/infantry_blue.png diff --git a/prototype/assets/pawns/infantry_neutral.png b/prototype/assets/pawns/infantry_neutral.png new file mode 100644 index 00000000..26e2bfa0 Binary files /dev/null and b/prototype/assets/pawns/infantry_neutral.png differ diff --git a/prototype/assets/pawns/infantry_red.png b/prototype/assets/pawns/infantry_red.png new file mode 100644 index 00000000..7e0d1e1b Binary files /dev/null and b/prototype/assets/pawns/infantry_red.png differ diff --git a/prototype/assets/pawns/mounted.png b/prototype/assets/pawns/mounted_blue.png similarity index 100% rename from prototype/assets/pawns/mounted.png rename to prototype/assets/pawns/mounted_blue.png diff --git a/prototype/assets/pawns/mounted_red.png b/prototype/assets/pawns/mounted_red.png new file mode 100644 index 00000000..b1000791 Binary files /dev/null and b/prototype/assets/pawns/mounted_red.png differ diff --git a/prototype/assets/unit/lumberjack.png b/prototype/assets/unit/lumberjack_blue.png similarity index 100% rename from prototype/assets/unit/lumberjack.png rename to prototype/assets/unit/lumberjack_blue.png diff --git a/prototype/assets/unit/lumberjack_red.png b/prototype/assets/unit/lumberjack_red.png new file mode 100644 index 00000000..e1d6b154 Binary files /dev/null and b/prototype/assets/unit/lumberjack_red.png differ diff --git a/prototype/buildings/barrack.tscn b/prototype/buildings/barrack.tscn index 0d91453a..f2475d23 100644 --- a/prototype/buildings/barrack.tscn +++ b/prototype/buildings/barrack.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=19 format=2] +[gd_scene load_steps=23 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] -[ext_resource path="res://assets/pawns/archer.png" type="Texture" id=2] -[ext_resource path="res://assets/buildings/buildings.png" type="Texture" id=3] +[ext_resource path="res://assets/pawns/archer_blue.png" type="Texture" id=2] +[ext_resource path="res://assets/buildings/buildings_blue.png" type="Texture" id=3] [ext_resource path="res://buildings/decoration/flag.tscn" type="PackedScene" id=4] -[ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=5] +[ext_resource path="res://assets/buildings/buildings_red.png" type="Texture" id=5] +[ext_resource path="res://assets/buildings/buildings_gray.png" type="Texture" id=6] [sub_resource type="Animation" id=24] resource_name = "attack" @@ -110,17 +111,35 @@ tracks/1/keys = { "values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ) ] } -[sub_resource type="ShaderMaterial" id=30] -shader = ExtResource( 5 ) -shader_param/origin = Color( 0.305882, 0.388235, 0.52549, 1 ) -shader_param/origin2 = Color( 0.32549, 0.584314, 0.709804, 1 ) -shader_param/origin3 = Color( 0.47451, 0.803922, 0.819608, 1 ) -shader_param/origin4 = null -shader_param/new = Color( 0.537255, 0.317647, 0.4, 1 ) -shader_param/new2 = Color( 0.843137, 0.396078, 0.396078, 1 ) -shader_param/new3 = Color( 0.929412, 0.627451, 0.568627, 1 ) -shader_param/new4 = null -shader_param/tolerance = 0.1 +[sub_resource type="AtlasTexture" id=43] +atlas = ExtResource( 3 ) +region = Rect2( 128, 0, 64, 128 ) + +[sub_resource type="AtlasTexture" id=44] +atlas = ExtResource( 5 ) +region = Rect2( 128, 0, 64, 128 ) + +[sub_resource type="AtlasTexture" id=45] +atlas = ExtResource( 6 ) +region = Rect2( 128, 0, 64, 128 ) + +[sub_resource type="SpriteFrames" id=46] +animations = [ { +"frames": [ SubResource( 43 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +}, { +"frames": [ SubResource( 44 ) ], +"loop": true, +"name": "red", +"speed": 5.0 +}, { +"frames": [ SubResource( 45 ) ], +"loop": true, +"name": "neutral", +"speed": 5.0 +} ] [sub_resource type="AtlasTexture" id=39] atlas = ExtResource( 2 ) @@ -205,22 +224,19 @@ anims/idle = SubResource( 25 ) [node name="shadow" parent="sprites" index="0"] visible = false -[node name="sprite" parent="sprites" index="1"] -visible = false +[node name="body" parent="sprites" index="1"] +visible = true +use_parent_material = false +frames = SubResource( 46 ) +animation = "default" +offset = Vector2( 0, -53 ) [node name="flags" type="Node2D" parent="sprites" index="2"] [node name="flag" parent="sprites/flags" index="0" instance=ExtResource( 4 )] position = Vector2( 1, -80 ) -[node name="body" type="Sprite" parent="sprites" index="3"] -material = SubResource( 30 ) -texture = ExtResource( 3 ) -offset = Vector2( 0, -40 ) -region_enabled = true -region_rect = Rect2( 128, 16, 64, 104 ) - -[node name="weapon" type="Node2D" parent="sprites" index="4"] +[node name="weapon" type="Node2D" parent="sprites" index="3"] position = Vector2( 0, -43 ) scale = Vector2( 1.0686, 1 ) diff --git a/prototype/buildings/blacksmith.tscn b/prototype/buildings/blacksmith.tscn index 483cbd92..0f1f88e8 100644 --- a/prototype/buildings/blacksmith.tscn +++ b/prototype/buildings/blacksmith.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=15 format=2] +[gd_scene load_steps=19 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] -[ext_resource path="res://assets/pawns/archer.png" type="Texture" id=2] -[ext_resource path="res://assets/buildings/neutral.png" type="Texture" id=3] +[ext_resource path="res://assets/pawns/archer_blue.png" type="Texture" id=2] +[ext_resource path="res://assets/buildings/neutral_blue.png" type="Texture" id=3] [ext_resource path="res://buildings/decoration/flag.tscn" type="PackedScene" id=4] -[ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=5] +[ext_resource path="res://assets/buildings/neutral_red.png" type="Texture" id=5] +[ext_resource path="res://assets/buildings/neutral_gray.png" type="Texture" id=6] [sub_resource type="Animation" id=24] resource_name = "attack" @@ -110,17 +111,35 @@ tracks/1/keys = { "values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ) ] } -[sub_resource type="ShaderMaterial" id=30] -shader = ExtResource( 5 ) -shader_param/origin = Color( 0.305882, 0.388235, 0.52549, 1 ) -shader_param/origin2 = Color( 0.32549, 0.584314, 0.709804, 1 ) -shader_param/origin3 = Color( 0.47451, 0.803922, 0.819608, 1 ) -shader_param/origin4 = Color( 0.2, 0.266667, 0.380392, 1 ) -shader_param/new = Color( 0.537255, 0.317647, 0.4, 1 ) -shader_param/new2 = Color( 0.843137, 0.396078, 0.396078, 1 ) -shader_param/new3 = Color( 0.929412, 0.627451, 0.568627, 1 ) -shader_param/new4 = Color( 0.462745, 0.219608, 0.294118, 1 ) -shader_param/tolerance = 0.1 +[sub_resource type="AtlasTexture" id=42] +atlas = ExtResource( 3 ) +region = Rect2( 237, 20, 62, 68 ) + +[sub_resource type="AtlasTexture" id=44] +atlas = ExtResource( 6 ) +region = Rect2( 237, 20, 62, 68 ) + +[sub_resource type="AtlasTexture" id=45] +atlas = ExtResource( 5 ) +region = Rect2( 237, 20, 62, 68 ) + +[sub_resource type="SpriteFrames" id=43] +animations = [ { +"frames": [ SubResource( 42 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +}, { +"frames": [ SubResource( 44 ) ], +"loop": true, +"name": "neutral", +"speed": 5.0 +}, { +"frames": [ SubResource( 45 ) ], +"loop": true, +"name": "red", +"speed": 5.0 +} ] [sub_resource type="AtlasTexture" id=39] atlas = ExtResource( 2 ) @@ -183,8 +202,12 @@ anims/idle = SubResource( 25 ) [node name="shadow" parent="sprites" index="0"] visible = false -[node name="sprite" parent="sprites" index="1"] -visible = false +[node name="body" parent="sprites" index="1"] +visible = true +use_parent_material = false +frames = SubResource( 43 ) +animation = "default" +offset = Vector2( 0, -30 ) [node name="flags" type="Node2D" parent="sprites" index="2"] visible = false @@ -192,14 +215,7 @@ visible = false [node name="flag" parent="sprites/flags" index="0" instance=ExtResource( 4 )] position = Vector2( 1, -80 ) -[node name="body" type="Sprite" parent="sprites" index="3"] -material = SubResource( 30 ) -texture = ExtResource( 3 ) -offset = Vector2( 0, -22 ) -region_enabled = true -region_rect = Rect2( 237, 20, 62, 68 ) - -[node name="weapon" type="Node2D" parent="sprites" index="4"] +[node name="weapon" type="Node2D" parent="sprites" index="3"] position = Vector2( 0, -43 ) scale = Vector2( 1.0686, 1 ) diff --git a/prototype/buildings/camp.tscn b/prototype/buildings/camp.tscn index a923769c..0b0ec77f 100644 --- a/prototype/buildings/camp.tscn +++ b/prototype/buildings/camp.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=16 format=2] +[gd_scene load_steps=20 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] -[ext_resource path="res://assets/pawns/archer.png" type="Texture" id=2] -[ext_resource path="res://assets/buildings/neutral.png" type="Texture" id=3] +[ext_resource path="res://assets/pawns/archer_blue.png" type="Texture" id=2] +[ext_resource path="res://assets/buildings/neutral_blue.png" type="Texture" id=3] [ext_resource path="res://buildings/decoration/flag.tscn" type="PackedScene" id=4] -[ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=5] +[ext_resource path="res://assets/buildings/neutral_red.png" type="Texture" id=5] +[ext_resource path="res://assets/buildings/neutral_gray.png" type="Texture" id=6] [sub_resource type="Animation" id=24] resource_name = "attack" @@ -110,17 +111,35 @@ tracks/1/keys = { "values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ) ] } -[sub_resource type="ShaderMaterial" id=30] -shader = ExtResource( 5 ) -shader_param/origin = Color( 0.305882, 0.388235, 0.52549, 1 ) -shader_param/origin2 = Color( 0.32549, 0.584314, 0.709804, 1 ) -shader_param/origin3 = Color( 0.47451, 0.803922, 0.819608, 1 ) -shader_param/origin4 = Color( 0.2, 0.266667, 0.380392, 1 ) -shader_param/new = Color( 0.537255, 0.317647, 0.4, 1 ) -shader_param/new2 = Color( 0.843137, 0.396078, 0.396078, 1 ) -shader_param/new3 = Color( 0.929412, 0.627451, 0.568627, 1 ) -shader_param/new4 = Color( 0.4, 0.180392, 0.25098, 1 ) -shader_param/tolerance = 0.1 +[sub_resource type="AtlasTexture" id=43] +atlas = ExtResource( 3 ) +region = Rect2( 64, 23, 75, 65 ) + +[sub_resource type="AtlasTexture" id=44] +atlas = ExtResource( 6 ) +region = Rect2( 64, 23, 75, 65 ) + +[sub_resource type="AtlasTexture" id=45] +atlas = ExtResource( 5 ) +region = Rect2( 64, 23, 75, 65 ) + +[sub_resource type="SpriteFrames" id=46] +animations = [ { +"frames": [ SubResource( 43 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +}, { +"frames": [ SubResource( 44 ) ], +"loop": true, +"name": "neutral", +"speed": 5.0 +}, { +"frames": [ SubResource( 45 ) ], +"loop": true, +"name": "red", +"speed": 5.0 +} ] [sub_resource type="AtlasTexture" id=39] atlas = ExtResource( 2 ) @@ -190,8 +209,12 @@ anims/idle = SubResource( 25 ) [node name="shadow" parent="sprites" index="0"] visible = false -[node name="sprite" parent="sprites" index="1"] -visible = false +[node name="body" parent="sprites" index="1"] +visible = true +use_parent_material = false +frames = SubResource( 46 ) +animation = "default" +offset = Vector2( 0, -30 ) [node name="flags" type="Node2D" parent="sprites" index="2"] visible = false @@ -199,14 +222,7 @@ visible = false [node name="flag" parent="sprites/flags" index="0" instance=ExtResource( 4 )] position = Vector2( 1, -80 ) -[node name="body" type="Sprite" parent="sprites" index="3"] -material = SubResource( 30 ) -texture = ExtResource( 3 ) -offset = Vector2( 0, -22 ) -region_enabled = true -region_rect = Rect2( 64, 23, 75, 65 ) - -[node name="weapon" type="Node2D" parent="sprites" index="4"] +[node name="weapon" type="Node2D" parent="sprites" index="3"] position = Vector2( -8, -27 ) scale = Vector2( 1.0686, 1 ) diff --git a/prototype/buildings/castle.tscn b/prototype/buildings/castle.tscn index 8dcd7228..808fc5f3 100644 --- a/prototype/buildings/castle.tscn +++ b/prototype/buildings/castle.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=19 format=2] +[gd_scene load_steps=23 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] [ext_resource path="res://buildings/decoration/flag.tscn" type="PackedScene" id=2] -[ext_resource path="res://assets/pawns/archer.png" type="Texture" id=3] -[ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=4] -[ext_resource path="res://assets/buildings/buildings.png" type="Texture" id=5] +[ext_resource path="res://assets/pawns/archer_blue.png" type="Texture" id=3] +[ext_resource path="res://assets/buildings/buildings_red.png" type="Texture" id=4] +[ext_resource path="res://assets/buildings/buildings_blue.png" type="Texture" id=5] +[ext_resource path="res://assets/buildings/buildings_gray.png" type="Texture" id=6] [sub_resource type="Animation" id=24] resource_name = "attack" @@ -40,6 +41,7 @@ tracks/1/keys = { [sub_resource type="Animation" id=31] resource_name = "death" length = 0.6 +loop = true tracks/0/type = "value" tracks/0/path = NodePath("sprites:scale") tracks/0/interp = 1 @@ -110,17 +112,35 @@ tracks/1/keys = { "values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ) ] } -[sub_resource type="ShaderMaterial" id=30] -shader = ExtResource( 4 ) -shader_param/origin = Color( 0.305882, 0.388235, 0.52549, 1 ) -shader_param/origin2 = Color( 0.32549, 0.584314, 0.709804, 1 ) -shader_param/origin3 = Color( 0.47451, 0.803922, 0.819608, 1 ) -shader_param/origin4 = null -shader_param/new = Color( 0.537255, 0.317647, 0.4, 1 ) -shader_param/new2 = Color( 0.843137, 0.396078, 0.396078, 1 ) -shader_param/new3 = Color( 0.929412, 0.627451, 0.568627, 1 ) -shader_param/new4 = null -shader_param/tolerance = 0.1 +[sub_resource type="AtlasTexture" id=43] +atlas = ExtResource( 5 ) +region = Rect2( 0, 0, 96, 128 ) + +[sub_resource type="AtlasTexture" id=45] +atlas = ExtResource( 6 ) +region = Rect2( 0, 0, 96, 128 ) + +[sub_resource type="AtlasTexture" id=44] +atlas = ExtResource( 4 ) +region = Rect2( 0, 0, 96, 128 ) + +[sub_resource type="SpriteFrames" id=46] +animations = [ { +"frames": [ SubResource( 43 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +}, { +"frames": [ SubResource( 45 ) ], +"loop": true, +"name": "neutral", +"speed": 5.0 +}, { +"frames": [ SubResource( 44 ) ], +"loop": true, +"name": "red", +"speed": 5.0 +} ] [sub_resource type="AtlasTexture" id=39] atlas = ExtResource( 3 ) @@ -204,8 +224,13 @@ anims/idle = SubResource( 25 ) [node name="shadow" parent="sprites" index="0"] visible = false -[node name="sprite" parent="sprites" index="1"] -visible = false +[node name="body" parent="sprites" index="1"] +visible = true +use_parent_material = false +position = Vector2( 0, 11 ) +frames = SubResource( 46 ) +animation = "default" +offset = Vector2( 0, -51 ) [node name="flags" type="Node2D" parent="sprites" index="2"] @@ -225,14 +250,7 @@ scale = Vector2( 0.8, 0.8 ) position = Vector2( 24, -97.5 ) scale = Vector2( 0.8, 0.8 ) -[node name="body" type="Sprite" parent="sprites" index="3"] -material = SubResource( 30 ) -texture = ExtResource( 5 ) -offset = Vector2( 0, -44 ) -region_enabled = true -region_rect = Rect2( 0, 0, 96, 120 ) - -[node name="weapon" type="Node2D" parent="sprites" index="4"] +[node name="weapon" type="Node2D" parent="sprites" index="3"] position = Vector2( 0, -37 ) scale = Vector2( 1.0686, 1 ) diff --git a/prototype/buildings/church.tscn b/prototype/buildings/church.tscn index cbcd7d8a..15e5ac27 100644 --- a/prototype/buildings/church.tscn +++ b/prototype/buildings/church.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=15 format=2] +[gd_scene load_steps=19 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] -[ext_resource path="res://assets/pawns/archer.png" type="Texture" id=2] -[ext_resource path="res://assets/buildings/neutral.png" type="Texture" id=3] +[ext_resource path="res://assets/pawns/archer_blue.png" type="Texture" id=2] +[ext_resource path="res://assets/buildings/neutral_blue.png" type="Texture" id=3] [ext_resource path="res://buildings/decoration/flag.tscn" type="PackedScene" id=4] -[ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=5] +[ext_resource path="res://assets/buildings/neutral_red.png" type="Texture" id=5] +[ext_resource path="res://assets/buildings/neutral_gray.png" type="Texture" id=6] [sub_resource type="Animation" id=24] resource_name = "attack" @@ -110,17 +111,35 @@ tracks/1/keys = { "values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ) ] } -[sub_resource type="ShaderMaterial" id=30] -shader = ExtResource( 5 ) -shader_param/origin = Color( 0.305882, 0.388235, 0.52549, 1 ) -shader_param/origin2 = Color( 0.32549, 0.584314, 0.709804, 1 ) -shader_param/origin3 = Color( 0.47451, 0.803922, 0.819608, 1 ) -shader_param/origin4 = Color( 0.2, 0.266667, 0.380392, 1 ) -shader_param/new = Color( 0.537255, 0.317647, 0.4, 1 ) -shader_param/new2 = Color( 0.843137, 0.396078, 0.396078, 1 ) -shader_param/new3 = Color( 0.929412, 0.627451, 0.568627, 1 ) -shader_param/new4 = Color( 0.462745, 0.219608, 0.294118, 1 ) -shader_param/tolerance = 0.1 +[sub_resource type="AtlasTexture" id=42] +atlas = ExtResource( 3 ) +region = Rect2( 0, 15, 64, 73 ) + +[sub_resource type="AtlasTexture" id=43] +atlas = ExtResource( 6 ) +region = Rect2( 0, 15, 64, 73 ) + +[sub_resource type="AtlasTexture" id=44] +atlas = ExtResource( 5 ) +region = Rect2( 0, 15, 64, 73 ) + +[sub_resource type="SpriteFrames" id=45] +animations = [ { +"frames": [ SubResource( 42 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +}, { +"frames": [ SubResource( 43 ) ], +"loop": true, +"name": "neutral", +"speed": 5.0 +}, { +"frames": [ SubResource( 44 ) ], +"loop": true, +"name": "red", +"speed": 5.0 +} ] [sub_resource type="AtlasTexture" id=39] atlas = ExtResource( 2 ) @@ -183,8 +202,13 @@ anims/idle = SubResource( 25 ) [node name="shadow" parent="sprites" index="0"] visible = false -[node name="sprite" parent="sprites" index="1"] -visible = false +[node name="body" parent="sprites" index="1"] +visible = true +use_parent_material = false +scale = Vector2( 1.5, 1.5 ) +frames = SubResource( 45 ) +animation = "default" +offset = Vector2( 0, -30 ) [node name="flags" type="Node2D" parent="sprites" index="2"] visible = false @@ -192,15 +216,7 @@ visible = false [node name="flag" parent="sprites/flags" index="0" instance=ExtResource( 4 )] position = Vector2( 1, -80 ) -[node name="body" type="Sprite" parent="sprites" index="3"] -material = SubResource( 30 ) -scale = Vector2( 1.5, 1.5 ) -texture = ExtResource( 3 ) -offset = Vector2( 0, -22 ) -region_enabled = true -region_rect = Rect2( 0, 15, 64, 73 ) - -[node name="weapon" type="Node2D" parent="sprites" index="4"] +[node name="weapon" type="Node2D" parent="sprites" index="3"] position = Vector2( 0, -43 ) scale = Vector2( 1.0686, 1 ) diff --git a/prototype/buildings/decoration/flag.tscn b/prototype/buildings/decoration/flag.tscn index 8ce51308..df9ad238 100644 --- a/prototype/buildings/decoration/flag.tscn +++ b/prototype/buildings/decoration/flag.tscn @@ -1,14 +1,77 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=9 format=2] -[ext_resource path="res://assets/buildings/buildings.png" type="Texture" id=1] -[ext_resource path="res://buildings/decoration/flag.tres" type="Material" id=2] +[ext_resource path="res://assets/buildings/buildings_blue.png" type="Texture" id=1] +[ext_resource path="res://assets/buildings/buildings_red.png" type="Texture" id=2] +[ext_resource path="res://assets/buildings/buildings_gray.png" type="Texture" id=3] + +[sub_resource type="AtlasTexture" id=2] +atlas = ExtResource( 1 ) +region = Rect2( 112, 0, 16, 14 ) + +[sub_resource type="AtlasTexture" id=3] +atlas = ExtResource( 2 ) +region = Rect2( 112, 0, 16, 14 ) + +[sub_resource type="AtlasTexture" id=4] +atlas = ExtResource( 3 ) +region = Rect2( 112, 0, 16, 14 ) + +[sub_resource type="SpriteFrames" id=5] +animations = [ { +"frames": [ SubResource( 2 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +}, { +"frames": [ SubResource( 3 ) ], +"loop": true, +"name": "red", +"speed": 5.0 +}, { +"frames": [ SubResource( 4 ) ], +"loop": true, +"name": "neutral", +"speed": 5.0 +} ] + +[sub_resource type="Animation" id=1] +resource_name = "idle" +loop = true +tracks/0/type = "value" +tracks/0/path = NodePath("sprites:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.4, 1 ), +"transitions": PoolRealArray( 1, 1, 1 ), +"update": 0, +"values": [ Vector2( 0, 0 ), Vector2( 0, -1 ), Vector2( 0, 0 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("sprites:rotation_degrees") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0, 0.6, 1 ), +"transitions": PoolRealArray( 1, 1, 1 ), +"update": 0, +"values": [ 4.0, 0.0, 4.0 ] +} [node name="flag" type="Node2D"] +use_parent_material = true -[node name="sprite" type="Sprite" parent="."] -material = ExtResource( 2 ) -texture = ExtResource( 1 ) +[node name="sprites" type="AnimatedSprite" parent="."] +use_parent_material = true +rotation = 0.0698132 +frames = SubResource( 5 ) centered = false -offset = Vector2( 0, -5 ) -region_enabled = true -region_rect = Rect2( 112, 3, 13, 10 ) +offset = Vector2( 0, -7 ) + +[node name="animations" type="AnimationPlayer" parent="."] +autoplay = "idle" +anims/idle = SubResource( 1 ) diff --git a/prototype/buildings/lumbermill.tscn b/prototype/buildings/lumbermill.tscn index 4284d866..8ec8b85b 100644 --- a/prototype/buildings/lumbermill.tscn +++ b/prototype/buildings/lumbermill.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=15 format=2] +[gd_scene load_steps=19 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] -[ext_resource path="res://assets/pawns/archer.png" type="Texture" id=2] -[ext_resource path="res://assets/buildings/neutral.png" type="Texture" id=3] +[ext_resource path="res://assets/pawns/archer_blue.png" type="Texture" id=2] +[ext_resource path="res://assets/buildings/neutral_blue.png" type="Texture" id=3] [ext_resource path="res://buildings/decoration/flag.tscn" type="PackedScene" id=4] -[ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=5] +[ext_resource path="res://assets/buildings/neutral_red.png" type="Texture" id=5] +[ext_resource path="res://assets/buildings/neutral_gray.png" type="Texture" id=6] [sub_resource type="Animation" id=24] resource_name = "attack" @@ -110,17 +111,35 @@ tracks/1/keys = { "values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ) ] } -[sub_resource type="ShaderMaterial" id=30] -shader = ExtResource( 5 ) -shader_param/origin = Color( 0.305882, 0.388235, 0.52549, 1 ) -shader_param/origin2 = Color( 0.32549, 0.584314, 0.709804, 1 ) -shader_param/origin3 = Color( 0.47451, 0.803922, 0.819608, 1 ) -shader_param/origin4 = Color( 0.2, 0.266667, 0.380392, 1 ) -shader_param/new = Color( 0.537255, 0.317647, 0.4, 1 ) -shader_param/new2 = Color( 0.843137, 0.396078, 0.396078, 1 ) -shader_param/new3 = Color( 0.929412, 0.627451, 0.568627, 1 ) -shader_param/new4 = Color( 0.462745, 0.219608, 0.294118, 1 ) -shader_param/tolerance = 0.1 +[sub_resource type="AtlasTexture" id=42] +atlas = ExtResource( 3 ) +region = Rect2( 299, 20, 64, 68 ) + +[sub_resource type="AtlasTexture" id=43] +atlas = ExtResource( 6 ) +region = Rect2( 299, 20, 64, 68 ) + +[sub_resource type="AtlasTexture" id=44] +atlas = ExtResource( 5 ) +region = Rect2( 299, 20, 64, 68 ) + +[sub_resource type="SpriteFrames" id=45] +animations = [ { +"frames": [ SubResource( 42 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +}, { +"frames": [ SubResource( 43 ) ], +"loop": true, +"name": "neutral", +"speed": 5.0 +}, { +"frames": [ SubResource( 44 ) ], +"loop": true, +"name": "red", +"speed": 5.0 +} ] [sub_resource type="AtlasTexture" id=39] atlas = ExtResource( 2 ) @@ -186,8 +205,12 @@ anims/idle = SubResource( 25 ) [node name="shadow" parent="sprites" index="0"] visible = false -[node name="sprite" parent="sprites" index="1"] -visible = false +[node name="body" parent="sprites" index="1"] +visible = true +use_parent_material = false +frames = SubResource( 45 ) +animation = "default" +offset = Vector2( 0, -30 ) [node name="flags" type="Node2D" parent="sprites" index="2"] visible = false @@ -195,14 +218,7 @@ visible = false [node name="flag" parent="sprites/flags" index="0" instance=ExtResource( 4 )] position = Vector2( 1, -80 ) -[node name="body" type="Sprite" parent="sprites" index="3"] -material = SubResource( 30 ) -texture = ExtResource( 3 ) -offset = Vector2( 0, -22 ) -region_enabled = true -region_rect = Rect2( 299, 20, 64, 68 ) - -[node name="weapon" type="Node2D" parent="sprites" index="4"] +[node name="weapon" type="Node2D" parent="sprites" index="3"] position = Vector2( 0, -43 ) scale = Vector2( 1.0686, 1 ) diff --git a/prototype/buildings/mine.tscn b/prototype/buildings/mine.tscn index 1eb31a89..92e35c88 100644 --- a/prototype/buildings/mine.tscn +++ b/prototype/buildings/mine.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=15 format=2] +[gd_scene load_steps=19 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] -[ext_resource path="res://assets/pawns/archer.png" type="Texture" id=2] -[ext_resource path="res://assets/buildings/neutral.png" type="Texture" id=3] +[ext_resource path="res://assets/pawns/archer_blue.png" type="Texture" id=2] +[ext_resource path="res://assets/buildings/neutral_blue.png" type="Texture" id=3] [ext_resource path="res://buildings/decoration/flag.tscn" type="PackedScene" id=4] -[ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=5] +[ext_resource path="res://assets/buildings/neutral_red.png" type="Texture" id=5] +[ext_resource path="res://assets/buildings/neutral_gray.png" type="Texture" id=6] [sub_resource type="Animation" id=24] resource_name = "attack" @@ -110,17 +111,35 @@ tracks/1/keys = { "values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ) ] } -[sub_resource type="ShaderMaterial" id=30] -shader = ExtResource( 5 ) -shader_param/origin = Color( 0.305882, 0.388235, 0.52549, 1 ) -shader_param/origin2 = Color( 0.32549, 0.584314, 0.709804, 1 ) -shader_param/origin3 = Color( 0.47451, 0.803922, 0.819608, 1 ) -shader_param/origin4 = Color( 0.2, 0.266667, 0.380392, 1 ) -shader_param/new = Color( 0.537255, 0.317647, 0.4, 1 ) -shader_param/new2 = Color( 0.843137, 0.396078, 0.396078, 1 ) -shader_param/new3 = Color( 0.929412, 0.627451, 0.568627, 1 ) -shader_param/new4 = Color( 0.462745, 0.219608, 0.294118, 1 ) -shader_param/tolerance = 0.1 +[sub_resource type="AtlasTexture" id=42] +atlas = ExtResource( 3 ) +region = Rect2( 139, 32, 64, 56 ) + +[sub_resource type="AtlasTexture" id=43] +atlas = ExtResource( 6 ) +region = Rect2( 139, 32, 64, 56 ) + +[sub_resource type="AtlasTexture" id=44] +atlas = ExtResource( 5 ) +region = Rect2( 139, 32, 64, 56 ) + +[sub_resource type="SpriteFrames" id=45] +animations = [ { +"frames": [ SubResource( 42 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +}, { +"frames": [ SubResource( 43 ) ], +"loop": true, +"name": "neutral", +"speed": 5.0 +}, { +"frames": [ SubResource( 44 ) ], +"loop": true, +"name": "red", +"speed": 5.0 +} ] [sub_resource type="AtlasTexture" id=39] atlas = ExtResource( 2 ) @@ -184,8 +203,12 @@ anims/idle = SubResource( 25 ) [node name="shadow" parent="sprites" index="0"] visible = false -[node name="sprite" parent="sprites" index="1"] -visible = false +[node name="body" parent="sprites" index="1"] +visible = true +use_parent_material = false +frames = SubResource( 45 ) +animation = "default" +offset = Vector2( 0, -30 ) [node name="flags" type="Node2D" parent="sprites" index="2"] visible = false @@ -193,14 +216,7 @@ visible = false [node name="flag" parent="sprites/flags" index="0" instance=ExtResource( 4 )] position = Vector2( 1, -80 ) -[node name="body" type="Sprite" parent="sprites" index="3"] -material = SubResource( 30 ) -texture = ExtResource( 3 ) -offset = Vector2( 0, -22 ) -region_enabled = true -region_rect = Rect2( 139, 32, 64, 56 ) - -[node name="weapon" type="Node2D" parent="sprites" index="4"] +[node name="weapon" type="Node2D" parent="sprites" index="3"] position = Vector2( 0, -43 ) scale = Vector2( 1.0686, 1 ) diff --git a/prototype/buildings/outpost.tscn b/prototype/buildings/outpost.tscn index ccc3e81b..1fbdc9ec 100644 --- a/prototype/buildings/outpost.tscn +++ b/prototype/buildings/outpost.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=19 format=2] +[gd_scene load_steps=23 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] -[ext_resource path="res://assets/pawns/archer.png" type="Texture" id=2] -[ext_resource path="res://assets/buildings/neutral.png" type="Texture" id=3] -[ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=4] +[ext_resource path="res://assets/pawns/archer_blue.png" type="Texture" id=2] +[ext_resource path="res://assets/buildings/neutral_blue.png" type="Texture" id=3] +[ext_resource path="res://assets/buildings/neutral_red.png" type="Texture" id=4] [ext_resource path="res://buildings/decoration/flag.tscn" type="PackedScene" id=5] +[ext_resource path="res://assets/buildings/neutral_gray.png" type="Texture" id=6] [sub_resource type="Animation" id=24] resource_name = "attack" @@ -110,17 +111,35 @@ tracks/1/keys = { "values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ) ] } -[sub_resource type="ShaderMaterial" id=30] -shader = ExtResource( 4 ) -shader_param/origin = Color( 0.305882, 0.388235, 0.52549, 1 ) -shader_param/origin2 = Color( 0.32549, 0.584314, 0.709804, 1 ) -shader_param/origin3 = Color( 0.47451, 0.803922, 0.819608, 1 ) -shader_param/origin4 = null -shader_param/new = Color( 0.537255, 0.317647, 0.4, 1 ) -shader_param/new2 = Color( 0.843137, 0.396078, 0.396078, 1 ) -shader_param/new3 = Color( 0.929412, 0.627451, 0.568627, 1 ) -shader_param/new4 = null -shader_param/tolerance = 0.1 +[sub_resource type="AtlasTexture" id=44] +atlas = ExtResource( 3 ) +region = Rect2( 203, 0, 34, 88 ) + +[sub_resource type="AtlasTexture" id=45] +atlas = ExtResource( 6 ) +region = Rect2( 203, 0, 34, 88 ) + +[sub_resource type="AtlasTexture" id=46] +atlas = ExtResource( 4 ) +region = Rect2( 203, 0, 34, 88 ) + +[sub_resource type="SpriteFrames" id=47] +animations = [ { +"frames": [ SubResource( 44 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +}, { +"frames": [ SubResource( 45 ) ], +"loop": true, +"name": "neutral", +"speed": 5.0 +}, { +"frames": [ SubResource( 46 ) ], +"loop": true, +"name": "red", +"speed": 5.0 +} ] [sub_resource type="AtlasTexture" id=39] atlas = ExtResource( 2 ) @@ -205,23 +224,20 @@ anims/idle = SubResource( 25 ) [node name="shadow" parent="sprites" index="0"] visible = false -[node name="sprite" parent="sprites" index="1"] -visible = false -position = Vector2( 0, 0 ) +[node name="body" parent="sprites" index="1"] +visible = true +use_parent_material = false +position = Vector2( 0, 11 ) +frames = SubResource( 47 ) +animation = "default" +offset = Vector2( 0, -44 ) [node name="flags" type="Node2D" parent="sprites" index="2"] [node name="flag" parent="sprites/flags" index="0" instance=ExtResource( 5 )] position = Vector2( 1, -71 ) -[node name="body" type="Sprite" parent="sprites" index="3"] -material = SubResource( 30 ) -texture = ExtResource( 3 ) -offset = Vector2( 0, -34 ) -region_enabled = true -region_rect = Rect2( 203, 0, 34, 88 ) - -[node name="weapon" type="Node2D" parent="sprites" index="4"] +[node name="weapon" type="Node2D" parent="sprites" index="3"] position = Vector2( 0, -34 ) scale = Vector2( 1.0686, 1 ) diff --git a/prototype/buildings/tower.tscn b/prototype/buildings/tower.tscn index c2cfe647..45903bf8 100644 --- a/prototype/buildings/tower.tscn +++ b/prototype/buildings/tower.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=19 format=2] +[gd_scene load_steps=23 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] -[ext_resource path="res://assets/pawns/archer.png" type="Texture" id=2] -[ext_resource path="res://assets/buildings/buildings.png" type="Texture" id=3] -[ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=4] +[ext_resource path="res://assets/pawns/archer_blue.png" type="Texture" id=2] +[ext_resource path="res://assets/buildings/buildings_blue.png" type="Texture" id=3] +[ext_resource path="res://assets/buildings/buildings_red.png" type="Texture" id=4] [ext_resource path="res://buildings/decoration/flag.tscn" type="PackedScene" id=5] +[ext_resource path="res://assets/buildings/buildings_gray.png" type="Texture" id=6] [sub_resource type="Animation" id=24] resource_name = "attack" @@ -110,17 +111,35 @@ tracks/1/keys = { "values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ) ] } -[sub_resource type="ShaderMaterial" id=30] -shader = ExtResource( 4 ) -shader_param/origin = Color( 0.305882, 0.388235, 0.52549, 1 ) -shader_param/origin2 = Color( 0.32549, 0.584314, 0.709804, 1 ) -shader_param/origin3 = Color( 0.47451, 0.803922, 0.819608, 1 ) -shader_param/origin4 = null -shader_param/new = Color( 0.537255, 0.317647, 0.4, 1 ) -shader_param/new2 = Color( 0.843137, 0.396078, 0.396078, 1 ) -shader_param/new3 = Color( 0.929412, 0.627451, 0.568627, 1 ) -shader_param/new4 = null -shader_param/tolerance = 0.1 +[sub_resource type="AtlasTexture" id=43] +atlas = ExtResource( 3 ) +region = Rect2( 96, 32, 32, 96 ) + +[sub_resource type="AtlasTexture" id=46] +atlas = ExtResource( 6 ) +region = Rect2( 96, 32, 32, 96 ) + +[sub_resource type="AtlasTexture" id=45] +atlas = ExtResource( 4 ) +region = Rect2( 96, 32, 32, 96 ) + +[sub_resource type="SpriteFrames" id=44] +animations = [ { +"frames": [ SubResource( 43 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +}, { +"frames": [ SubResource( 46 ) ], +"loop": true, +"name": "neutral", +"speed": 5.0 +}, { +"frames": [ SubResource( 45 ) ], +"loop": true, +"name": "red", +"speed": 5.0 +} ] [sub_resource type="AtlasTexture" id=39] atlas = ExtResource( 2 ) @@ -204,23 +223,19 @@ anims/idle = SubResource( 25 ) [node name="shadow" parent="sprites" index="0"] visible = false -[node name="sprite" parent="sprites" index="1"] -visible = false -position = Vector2( 0, 0 ) +[node name="body" parent="sprites" index="1"] +visible = true +use_parent_material = false +frames = SubResource( 44 ) +animation = "default" +offset = Vector2( 0, -36 ) [node name="flags" type="Node2D" parent="sprites" index="2"] [node name="flag" parent="sprites/flags" index="0" instance=ExtResource( 5 )] position = Vector2( 1, -58 ) -[node name="body" type="Sprite" parent="sprites" index="3"] -material = SubResource( 30 ) -texture = ExtResource( 3 ) -offset = Vector2( 0, -27 ) -region_enabled = true -region_rect = Rect2( 96, 40, 32, 80 ) - -[node name="weapon" type="Node2D" parent="sprites" index="4"] +[node name="weapon" type="Node2D" parent="sprites" index="3"] position = Vector2( 0, -24 ) scale = Vector2( 1.0686, 1 ) diff --git a/prototype/game.gd b/prototype/game.gd index e0d82f0f..df8209da 100644 --- a/prototype/game.gd +++ b/prototype/game.gd @@ -65,6 +65,7 @@ func _process(delta: float) -> void: func build(): + if not built: built = true @@ -89,7 +90,7 @@ func start(): unit.follow.setup_pathfind() unit.spawn.choose_leaders() - if test.fog: map.fog.cover_map() + map.get_node("fog").visible = true if test.unit: test.spawn_unit() @@ -106,5 +107,5 @@ func _physics_process(delta): if started: collision.process(delta) -func can_control(unit): - return (unit and not unit.dead) # and unit.team == game.player_team +func can_control(unit1): + return (unit1 and not unit1.dead) # and unit.team == game.player_team diff --git a/prototype/leaders/arthur.tscn b/prototype/leaders/arthur.tscn index 79d0f04a..5e5909fb 100644 --- a/prototype/leaders/arthur.tscn +++ b/prototype/leaders/arthur.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=17 format=2] +[gd_scene load_steps=24 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] [ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=2] -[ext_resource path="res://assets/leaders/arthur.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/arthur_blue.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/arthur_red.png" type="Texture" id=4] [sub_resource type="ShaderMaterial" id=30] shader = ExtResource( 2 ) @@ -494,12 +495,50 @@ region = Rect2( 24, 0, 24, 24 ) atlas = ExtResource( 3 ) region = Rect2( 48, 0, 24, 24 ) +[sub_resource type="AtlasTexture" id=38] +atlas = ExtResource( 4 ) +region = Rect2( 0, 0, 24, 24 ) + +[sub_resource type="AtlasTexture" id=39] +atlas = ExtResource( 4 ) +region = Rect2( 24, 0, 24, 24 ) + +[sub_resource type="AtlasTexture" id=40] +atlas = ExtResource( 4 ) +region = Rect2( 48, 0, 24, 24 ) + [sub_resource type="SpriteFrames" id=36] animations = [ { "frames": [ SubResource( 37 ), SubResource( 34 ), SubResource( 35 ) ], "loop": true, "name": "default", "speed": 5.0 +}, { +"frames": [ SubResource( 38 ), SubResource( 39 ), SubResource( 40 ) ], +"loop": true, +"name": "red", +"speed": 5.0 +} ] + +[sub_resource type="AtlasTexture" id=62] +atlas = ExtResource( 3 ) +region = Rect2( 72, 0, 24, 24 ) + +[sub_resource type="AtlasTexture" id=64] +atlas = ExtResource( 4 ) +region = Rect2( 72, 0, 24, 24 ) + +[sub_resource type="SpriteFrames" id=63] +animations = [ { +"frames": [ SubResource( 62 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +}, { +"frames": [ SubResource( 64 ) ], +"loop": true, +"name": "red", +"speed": 5.0 } ] [sub_resource type="CircleShape2D" id=32] @@ -557,26 +596,17 @@ anims/idle = SubResource( 25 ) anims/move = SubResource( 26 ) anims/stun = SubResource( 33 ) -[node name="body" type="AnimatedSprite" parent="sprites" index="1"] -material = SubResource( 30 ) -position = Vector2( 0, 9 ) -rotation = 0.0379431 -scale = Vector2( 1, 0.934238 ) +[node name="body" parent="sprites" index="1"] +visible = true frames = SubResource( 36 ) +animation = "default" frame = 2 offset = Vector2( -2, -12 ) -[node name="weapon" type="Sprite" parent="sprites" index="2"] -material = SubResource( 30 ) -position = Vector2( 7, 0 ) -rotation = 1.30823 -texture = ExtResource( 3 ) -offset = Vector2( 7, -6 ) -region_enabled = true -region_rect = Rect2( 82, 0, 14, 20 ) - -[node name="sprite" parent="sprites" index="3"] -visible = false +[node name="weapon" type="AnimatedSprite" parent="sprites" index="2"] +position = Vector2( 6, 0 ) +frames = SubResource( 63 ) +offset = Vector2( 2, -4 ) [node name="block" parent="collisions" index="0"] shape = SubResource( 32 ) diff --git a/prototype/leaders/bokuden.tscn b/prototype/leaders/bokuden.tscn index ab8e8148..1c240b91 100644 --- a/prototype/leaders/bokuden.tscn +++ b/prototype/leaders/bokuden.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=18 format=2] +[gd_scene load_steps=24 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] [ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=2] -[ext_resource path="res://assets/leaders/bokuden.png" type="Texture" id=4] +[ext_resource path="res://assets/leaders/bokuden_red.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/bokuden_blue.png" type="Texture" id=4] [sub_resource type="ShaderMaterial" id=40] shader = ExtResource( 2 ) @@ -542,25 +543,51 @@ region = Rect2( 38, 0, 38, 38 ) atlas = ExtResource( 4 ) region = Rect2( 76, 0, 38, 38 ) +[sub_resource type="AtlasTexture" id=45] +atlas = ExtResource( 3 ) +region = Rect2( 0, 0, 38, 38 ) + +[sub_resource type="AtlasTexture" id=46] +atlas = ExtResource( 3 ) +region = Rect2( 38, 0, 38, 38 ) + +[sub_resource type="AtlasTexture" id=47] +atlas = ExtResource( 3 ) +region = Rect2( 76, 0, 38, 38 ) + [sub_resource type="SpriteFrames" id=44] animations = [ { "frames": [ SubResource( 41 ), SubResource( 42 ), SubResource( 43 ) ], "loop": true, "name": "default", "speed": 5.0 +}, { +"frames": [ SubResource( 45 ), SubResource( 46 ), SubResource( 47 ) ], +"loop": true, +"name": "red", +"speed": 5.0 } ] -[sub_resource type="ShaderMaterial" id=30] -shader = ExtResource( 2 ) -shader_param/origin = Color( 0.305882, 0.388235, 0.52549, 1 ) -shader_param/origin2 = Color( 0.32549, 0.584314, 0.709804, 1 ) -shader_param/origin3 = Color( 0.47451, 0.803922, 0.819608, 1 ) -shader_param/origin4 = null -shader_param/new = Color( 0.537255, 0.317647, 0.4, 1 ) -shader_param/new2 = Color( 0.843137, 0.396078, 0.396078, 1 ) -shader_param/new3 = Color( 0.929412, 0.627451, 0.568627, 1 ) -shader_param/new4 = null -shader_param/tolerance = 0.1 +[sub_resource type="AtlasTexture" id=48] +atlas = ExtResource( 4 ) +region = Rect2( 114, 0, 38, 38 ) + +[sub_resource type="AtlasTexture" id=49] +atlas = ExtResource( 3 ) +region = Rect2( 114, 0, 38, 38 ) + +[sub_resource type="SpriteFrames" id=50] +animations = [ { +"frames": [ SubResource( 48 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +}, { +"frames": [ SubResource( 49 ) ], +"loop": true, +"name": "red", +"speed": 5.0 +} ] [sub_resource type="CircleShape2D" id=32] @@ -610,25 +637,17 @@ anims/idle = SubResource( 25 ) anims/move = SubResource( 26 ) anims/stun = SubResource( 33 ) -[node name="body" type="AnimatedSprite" parent="sprites" index="1"] -material = SubResource( 40 ) -position = Vector2( 0, 9 ) -rotation = 0.076719 -scale = Vector2( 1, 0.923714 ) +[node name="body" parent="sprites" index="1"] +visible = true frames = SubResource( 44 ) +animation = "default" +frame = 2 offset = Vector2( -3, -16 ) -[node name="weapon" type="Sprite" parent="sprites" index="2"] -visible = false -material = SubResource( 30 ) -position = Vector2( 8, 1 ) -texture = ExtResource( 4 ) -offset = Vector2( 7, -9 ) -region_enabled = true -region_rect = Rect2( 132, 6, 14, 23 ) - -[node name="sprite" parent="sprites" index="3"] -visible = false +[node name="weapon" type="AnimatedSprite" parent="sprites" index="2"] +position = Vector2( 7, 0 ) +frames = SubResource( 50 ) +offset = Vector2( 2, -7 ) [node name="block" parent="collisions" index="0"] shape = SubResource( 32 ) diff --git a/prototype/leaders/hongi.tscn b/prototype/leaders/hongi.tscn index 165c3efd..f8191437 100644 --- a/prototype/leaders/hongi.tscn +++ b/prototype/leaders/hongi.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=22 format=2] +[gd_scene load_steps=26 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] [ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=2] -[ext_resource path="res://assets/leaders/hongi.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/hongi_blue.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/hongi_red.png" type="Texture" id=4] [sub_resource type="ShaderMaterial" id=30] shader = ExtResource( 2 ) @@ -506,12 +507,29 @@ region = Rect2( 40, 0, 40, 32 ) atlas = ExtResource( 3 ) region = Rect2( 80, 0, 40, 32 ) +[sub_resource type="AtlasTexture" id=43] +atlas = ExtResource( 4 ) +region = Rect2( 0, 0, 40, 32 ) + +[sub_resource type="AtlasTexture" id=44] +atlas = ExtResource( 4 ) +region = Rect2( 40, 0, 40, 32 ) + +[sub_resource type="AtlasTexture" id=45] +atlas = ExtResource( 4 ) +region = Rect2( 80, 0, 40, 32 ) + [sub_resource type="SpriteFrames" id=36] animations = [ { "frames": [ SubResource( 42 ), SubResource( 34 ), SubResource( 35 ) ], "loop": true, "name": "default", "speed": 5.0 +}, { +"frames": [ SubResource( 43 ), SubResource( 44 ), SubResource( 45 ) ], +"loop": true, +"name": "red", +"speed": 5.0 } ] [sub_resource type="AtlasTexture" id=40] @@ -599,15 +617,16 @@ anims/stun = SubResource( 33 ) [node name="shadow" parent="sprites" index="0"] position = Vector2( 0, 9 ) -[node name="body" type="AnimatedSprite" parent="sprites" index="1"] -material = SubResource( 30 ) -position = Vector2( 0, 9 ) +[node name="body" parent="sprites" index="1"] +visible = true frames = SubResource( 36 ) +animation = "red" offset = Vector2( -6, -15 ) [node name="axe" type="AnimatedSprite" parent="sprites" index="2"] visible = false modulate = Color( 1, 1, 1, 0 ) +use_parent_material = true position = Vector2( -8, -4 ) rotation = -1.5708 frames = SubResource( 41 ) @@ -615,19 +634,19 @@ offset = Vector2( 6, -4 ) [node name="weapon" type="Node2D" parent="sprites" index="3"] visible = false +use_parent_material = true position = Vector2( 0, -8 ) scale = Vector2( 1.0686, 1 ) [node name="projectile" type="Node2D" parent="sprites/weapon" index="0"] visible = false +use_parent_material = true z_index = 1 [node name="sprites" type="AnimatedSprite" parent="sprites/weapon/projectile" index="0"] +use_parent_material = true frames = SubResource( 39 ) -[node name="sprite" parent="sprites" index="4"] -visible = false - [node name="block" parent="collisions" index="0"] shape = SubResource( 32 ) diff --git a/prototype/leaders/lorne.tscn b/prototype/leaders/lorne.tscn index 88c898b8..26a493cc 100644 --- a/prototype/leaders/lorne.tscn +++ b/prototype/leaders/lorne.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=22 format=2] +[gd_scene load_steps=31 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] [ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=2] -[ext_resource path="res://assets/leaders/lorne.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/lorne_blue.png" type="Texture" id=3] [ext_resource path="res://assets/unit/shadow.png" type="Texture" id=4] +[ext_resource path="res://assets/leaders/lorne_red.png" type="Texture" id=5] [sub_resource type="ShaderMaterial" id=30] shader = ExtResource( 2 ) @@ -105,7 +106,7 @@ tracks/6/keys = { "times": PoolRealArray( 0, 0.2, 0.3, 0.4, 0.8 ), "transitions": PoolRealArray( 1, 1, 1, 1, 1 ), "update": 0, -"values": [ 0.0, -50.0, 120.0, 130.0, 0.0 ] +"values": [ 0.0, -80.0, 120.0, 100.0, 0.0 ] } tracks/7/type = "value" tracks/7/path = NodePath("sprites/weapon:visible") @@ -507,25 +508,63 @@ region = Rect2( 192, 0, 48, 48 ) atlas = ExtResource( 3 ) region = Rect2( 240, 0, 48, 48 ) +[sub_resource type="AtlasTexture" id=54] +atlas = ExtResource( 5 ) +region = Rect2( 0, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=55] +atlas = ExtResource( 5 ) +region = Rect2( 48, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=56] +atlas = ExtResource( 5 ) +region = Rect2( 96, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=57] +atlas = ExtResource( 5 ) +region = Rect2( 144, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=58] +atlas = ExtResource( 5 ) +region = Rect2( 192, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=59] +atlas = ExtResource( 5 ) +region = Rect2( 240, 0, 48, 48 ) + [sub_resource type="SpriteFrames" id=36] animations = [ { "frames": [ SubResource( 48 ), SubResource( 49 ), SubResource( 50 ), SubResource( 51 ), SubResource( 52 ), SubResource( 53 ) ], "loop": true, "name": "default", "speed": 5.0 +}, { +"frames": [ SubResource( 54 ), SubResource( 55 ), SubResource( 56 ), SubResource( 57 ), SubResource( 58 ), SubResource( 59 ) ], +"loop": true, +"name": "red", +"speed": 5.0 } ] -[sub_resource type="ShaderMaterial" id=54] -shader = ExtResource( 2 ) -shader_param/origin = Color( 0.305882, 0.388235, 0.52549, 1 ) -shader_param/origin2 = Color( 0.32549, 0.584314, 0.709804, 1 ) -shader_param/origin3 = Color( 0.47451, 0.803922, 0.819608, 1 ) -shader_param/origin4 = Color( 0.290196, 0.572549, 0.427451, 1 ) -shader_param/new = Color( 0.537255, 0.317647, 0.4, 1 ) -shader_param/new2 = Color( 0.843137, 0.396078, 0.396078, 1 ) -shader_param/new3 = Color( 0.929412, 0.627451, 0.568627, 1 ) -shader_param/new4 = Color( 0.521569, 0.721569, 0.305882, 1 ) -shader_param/tolerance = 0.1 +[sub_resource type="AtlasTexture" id=60] +atlas = ExtResource( 3 ) +region = Rect2( 288, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=61] +atlas = ExtResource( 5 ) +region = Rect2( 288, 0, 48, 48 ) + +[sub_resource type="SpriteFrames" id=62] +animations = [ { +"frames": [ SubResource( 60 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +}, { +"frames": [ SubResource( 61 ) ], +"loop": true, +"name": "red", +"speed": 5.0 +} ] [sub_resource type="CircleShape2D" id=46] radius = 14.0 @@ -587,28 +626,24 @@ visible = false [node name="big_shadow" type="Sprite" parent="sprites" index="1"] modulate = Color( 0, 0, 0, 0.294118 ) +light_mask = 0 +use_parent_material = true position = Vector2( 0, 8 ) scale = Vector2( 1.3, 1.4 ) texture = ExtResource( 4 ) -[node name="body" type="AnimatedSprite" parent="sprites" index="2"] -material = SubResource( 30 ) +[node name="body" parent="sprites" index="2"] +visible = true position = Vector2( 2, 9 ) frames = SubResource( 36 ) -frame = 2 +animation = "default" offset = Vector2( 4, -22 ) -[node name="sprite" parent="sprites" index="3"] +[node name="weapon" type="AnimatedSprite" parent="sprites" index="3"] visible = false - -[node name="weapon" type="Sprite" parent="sprites" index="4"] -material = SubResource( 54 ) position = Vector2( -1, -16 ) -texture = ExtResource( 3 ) -centered = false -offset = Vector2( 1, -20 ) -region_enabled = true -region_rect = Rect2( 308, 9, 16, 31 ) +frames = SubResource( 62 ) +offset = Vector2( 2, -4 ) [node name="block" parent="collisions" index="0"] position = Vector2( 0, -10 ) diff --git a/prototype/leaders/nagato.tscn b/prototype/leaders/nagato.tscn index f3fcb689..29fae909 100644 --- a/prototype/leaders/nagato.tscn +++ b/prototype/leaders/nagato.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=21 format=2] +[gd_scene load_steps=25 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] [ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=2] -[ext_resource path="res://assets/leaders/hongi.png" type="Texture" id=3] -[ext_resource path="res://assets/leaders/nagato.png" type="Texture" id=4] +[ext_resource path="res://assets/leaders/hongi_blue.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/nagato_blue.png" type="Texture" id=4] +[ext_resource path="res://assets/leaders/nagato_red.png" type="Texture" id=5] [sub_resource type="ShaderMaterial" id=30] shader = ExtResource( 2 ) @@ -507,12 +508,29 @@ region = Rect2( 32, 0, 32, 32 ) atlas = ExtResource( 4 ) region = Rect2( 64, 0, 32, 32 ) +[sub_resource type="AtlasTexture" id=46] +atlas = ExtResource( 5 ) +region = Rect2( 0, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=47] +atlas = ExtResource( 5 ) +region = Rect2( 32, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=48] +atlas = ExtResource( 5 ) +region = Rect2( 64, 0, 32, 32 ) + [sub_resource type="SpriteFrames" id=36] animations = [ { "frames": [ SubResource( 42 ), SubResource( 43 ), SubResource( 44 ) ], "loop": true, "name": "default", "speed": 5.0 +}, { +"frames": [ SubResource( 46 ), SubResource( 47 ), SubResource( 48 ) ], +"loop": true, +"name": "red", +"speed": 5.0 } ] [sub_resource type="AtlasTexture" id=45] @@ -592,36 +610,35 @@ anims/stun = SubResource( 33 ) [node name="shadow" parent="sprites" index="0"] position = Vector2( 0, 9 ) -[node name="body" type="AnimatedSprite" parent="sprites" index="1"] -material = SubResource( 30 ) -position = Vector2( 0, 9 ) -rotation = 0.0654572 -scale = Vector2( 1, 0.90624 ) +[node name="body" parent="sprites" index="1"] +visible = true frames = SubResource( 36 ) -frame = 2 +animation = "default" offset = Vector2( 0, -13 ) [node name="shuriken" type="AnimatedSprite" parent="sprites" index="2"] visible = false +modulate = Color( 1, 1, 1, 0 ) +use_parent_material = true position = Vector2( -8, -6 ) -rotation = -1.07987 +rotation = -1.5708 frames = SubResource( 41 ) [node name="weapon" type="Node2D" parent="sprites" index="3"] visible = false +use_parent_material = true position = Vector2( 0, -8 ) scale = Vector2( 1.0686, 1 ) [node name="projectile" type="Node2D" parent="sprites/weapon" index="0"] visible = false +use_parent_material = true z_index = 1 [node name="sprites" type="AnimatedSprite" parent="sprites/weapon/projectile" index="0"] +use_parent_material = true frames = SubResource( 39 ) -[node name="sprite" parent="sprites" index="4"] -visible = false - [node name="block" parent="collisions" index="0"] shape = SubResource( 32 ) diff --git a/prototype/leaders/osman.tscn b/prototype/leaders/osman.tscn index d3277aea..193fb6c7 100644 --- a/prototype/leaders/osman.tscn +++ b/prototype/leaders/osman.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=17 format=2] +[gd_scene load_steps=24 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] [ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=2] -[ext_resource path="res://assets/leaders/osman.png" type="Texture" id=4] +[ext_resource path="res://assets/leaders/osman_red.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/osman_blue.png" type="Texture" id=4] [sub_resource type="ShaderMaterial" id=30] shader = ExtResource( 2 ) @@ -66,7 +67,7 @@ tracks/3/keys = { "times": PoolRealArray( 0, 0.2, 0.3, 0.6 ), "transitions": PoolRealArray( 1, 1, 1, 1 ), "update": 0, -"values": [ 0.0, -90.0, 40.0, 0.0 ] +"values": [ 0.0, -90.0, 50.0, 0.0 ] } tracks/4/type = "value" tracks/4/path = NodePath("sprites/weapon:visible") @@ -118,18 +119,6 @@ tracks/7/keys = { "update": 0, "values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ) ] } -tracks/8/type = "value" -tracks/8/path = NodePath("sprites/weapon:position") -tracks/8/interp = 1 -tracks/8/loop_wrap = true -tracks/8/imported = false -tracks/8/enabled = true -tracks/8/keys = { -"times": PoolRealArray( 0, 0.2, 0.3, 0.6 ), -"transitions": PoolRealArray( 1, 1, 1, 1 ), -"update": 0, -"values": [ Vector2( 7, -3 ), Vector2( 7, -3 ), Vector2( 8, -2 ), Vector2( 7, -3 ) ] -} [sub_resource type="Animation" id=31] resource_name = "death" @@ -506,12 +495,50 @@ region = Rect2( 32, 0, 32, 32 ) atlas = ExtResource( 4 ) region = Rect2( 64, 0, 32, 32 ) +[sub_resource type="AtlasTexture" id=40] +atlas = ExtResource( 3 ) +region = Rect2( 0, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=41] +atlas = ExtResource( 3 ) +region = Rect2( 32, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=42] +atlas = ExtResource( 3 ) +region = Rect2( 64, 0, 32, 32 ) + [sub_resource type="SpriteFrames" id=36] animations = [ { "frames": [ SubResource( 37 ), SubResource( 38 ), SubResource( 39 ) ], "loop": true, "name": "default", "speed": 5.0 +}, { +"frames": [ SubResource( 40 ), SubResource( 41 ), SubResource( 42 ) ], +"loop": true, +"name": "red", +"speed": 5.0 +} ] + +[sub_resource type="AtlasTexture" id=43] +atlas = ExtResource( 4 ) +region = Rect2( 96, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=44] +atlas = ExtResource( 3 ) +region = Rect2( 96, 0, 32, 32 ) + +[sub_resource type="SpriteFrames" id=45] +animations = [ { +"frames": [ SubResource( 43 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +}, { +"frames": [ SubResource( 44 ) ], +"loop": true, +"name": "red", +"speed": 5.0 } ] [sub_resource type="CircleShape2D" id=32] @@ -572,24 +599,18 @@ anims/stun = SubResource( 33 ) position = Vector2( 0, 9 ) scale = Vector2( 1.30769, 1.37553 ) -[node name="body" type="AnimatedSprite" parent="sprites" index="1"] -material = SubResource( 30 ) -position = Vector2( 0, 9 ) +[node name="body" parent="sprites" index="1"] +visible = true frames = SubResource( 36 ) +animation = "default" offset = Vector2( -4, -15 ) -[node name="weapon" type="Sprite" parent="sprites" index="2"] +[node name="weapon" type="AnimatedSprite" parent="sprites" index="2"] visible = false -material = SubResource( 30 ) -position = Vector2( 7.72488, -2.27512 ) -rotation = 0.506059 -texture = ExtResource( 4 ) +position = Vector2( 8, -2 ) +rotation = -1.02617 +frames = SubResource( 45 ) offset = Vector2( 6, -2 ) -region_enabled = true -region_rect = Rect2( 105, 4, 15, 24 ) - -[node name="sprite" parent="sprites" index="3"] -visible = false [node name="block" parent="collisions" index="0"] shape = SubResource( 32 ) diff --git a/prototype/leaders/raja.tscn b/prototype/leaders/raja.tscn index 70a70348..ef0f3d25 100644 --- a/prototype/leaders/raja.tscn +++ b/prototype/leaders/raja.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=17 format=2] +[gd_scene load_steps=24 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] [ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=2] -[ext_resource path="res://assets/leaders/raja.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/raja_blue.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/raja_red.png" type="Texture" id=4] [sub_resource type="ShaderMaterial" id=30] shader = ExtResource( 2 ) @@ -494,12 +495,50 @@ region = Rect2( 32, 0, 32, 32 ) atlas = ExtResource( 3 ) region = Rect2( 64, 0, 32, 32 ) +[sub_resource type="AtlasTexture" id=38] +atlas = ExtResource( 4 ) +region = Rect2( 0, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=39] +atlas = ExtResource( 4 ) +region = Rect2( 32, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=40] +atlas = ExtResource( 4 ) +region = Rect2( 64, 0, 32, 32 ) + [sub_resource type="SpriteFrames" id=36] animations = [ { "frames": [ SubResource( 37 ), SubResource( 34 ), SubResource( 35 ) ], "loop": true, "name": "default", "speed": 5.0 +}, { +"frames": [ SubResource( 38 ), SubResource( 39 ), SubResource( 40 ) ], +"loop": true, +"name": "red", +"speed": 5.0 +} ] + +[sub_resource type="AtlasTexture" id=41] +atlas = ExtResource( 3 ) +region = Rect2( 96, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=42] +atlas = ExtResource( 4 ) +region = Rect2( 96, 0, 32, 32 ) + +[sub_resource type="SpriteFrames" id=43] +animations = [ { +"frames": [ SubResource( 41 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +}, { +"frames": [ SubResource( 42 ) ], +"loop": true, +"name": "red", +"speed": 5.0 } ] [sub_resource type="CircleShape2D" id=32] @@ -546,25 +585,17 @@ anims/idle = SubResource( 25 ) anims/move = SubResource( 26 ) anims/stun = SubResource( 33 ) -[node name="body" type="AnimatedSprite" parent="sprites" index="1"] -material = SubResource( 30 ) -position = Vector2( 0, 9 ) -scale = Vector2( 1, 1.02753 ) +[node name="body" parent="sprites" index="1"] +visible = true frames = SubResource( 36 ) +animation = "default" +frame = 2 offset = Vector2( 2, -15 ) -[node name="weapon" type="Sprite" parent="sprites" index="2"] -visible = false -material = SubResource( 30 ) -position = Vector2( 6, 2 ) -rotation = 0.176891 -texture = ExtResource( 3 ) +[node name="weapon" type="AnimatedSprite" parent="sprites" index="2"] +position = Vector2( 6, 1 ) +frames = SubResource( 43 ) offset = Vector2( 6, -6 ) -region_enabled = true -region_rect = Rect2( 104, 5, 17, 25 ) - -[node name="sprite" parent="sprites" index="3"] -visible = false [node name="block" parent="collisions" index="0"] shape = SubResource( 32 ) diff --git a/prototype/leaders/robin.tscn b/prototype/leaders/robin.tscn index 8e6ab2d9..4afa3668 100644 --- a/prototype/leaders/robin.tscn +++ b/prototype/leaders/robin.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=23 format=2] +[gd_scene load_steps=27 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] [ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=2] -[ext_resource path="res://assets/leaders/robin.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/robin_blue.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/robin_red.png" type="Texture" id=4] [sub_resource type="ShaderMaterial" id=30] shader = ExtResource( 2 ) @@ -590,12 +591,29 @@ region = Rect2( 32, 0, 32, 32 ) atlas = ExtResource( 3 ) region = Rect2( 64, 0, 32, 32 ) +[sub_resource type="AtlasTexture" id=44] +atlas = ExtResource( 4 ) +region = Rect2( 0, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=45] +atlas = ExtResource( 4 ) +region = Rect2( 32, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=46] +atlas = ExtResource( 4 ) +region = Rect2( 64, 0, 32, 32 ) + [sub_resource type="SpriteFrames" id=36] animations = [ { "frames": [ SubResource( 43 ), SubResource( 34 ), SubResource( 35 ) ], "loop": true, "name": "default", "speed": 5.0 +}, { +"frames": [ SubResource( 44 ), SubResource( 45 ), SubResource( 46 ) ], +"loop": true, +"name": "red", +"speed": 5.0 } ] [sub_resource type="AtlasTexture" id=37] @@ -683,41 +701,38 @@ anims/idle = SubResource( 25 ) anims/move = SubResource( 26 ) anims/stun = SubResource( 33 ) -[node name="body" type="AnimatedSprite" parent="sprites" index="1"] -material = SubResource( 30 ) -position = Vector2( 0, 9 ) -rotation = 0.0315551 -scale = Vector2( 1, 0.971965 ) +[node name="body" parent="sprites" index="1"] +visible = true frames = SubResource( 36 ) +animation = "default" frame = 1 offset = Vector2( 0, -15 ) [node name="weapon" type="Node2D" parent="sprites" index="2"] +use_parent_material = true position = Vector2( 0, -4 ) scale = Vector2( 1.0686, 1 ) [node name="projectile" type="Node2D" parent="sprites/weapon" index="0"] visible = false -modulate = Color( 1, 1, 1, 0.724157 ) +modulate = Color( 1, 1, 1, 0 ) +use_parent_material = true position = Vector2( 22.1654, 1 ) [node name="sprites" type="AnimatedSprite" parent="sprites/weapon/projectile" index="0"] +use_parent_material = true position = Vector2( 19.8074, 3 ) frames = SubResource( 39 ) offset = Vector2( -33, -3 ) [node name="bow" type="AnimatedSprite" parent="sprites/weapon" index="1"] visible = false +use_parent_material = true position = Vector2( 0, 1 ) -rotation = 0.000829373 -scale = Vector2( 0.856039, 1 ) +rotation = 0.349066 frames = SubResource( 42 ) -frame = 1 offset = Vector2( 10, 0 ) -[node name="sprite" parent="sprites" index="3"] -visible = false - [node name="block" parent="collisions" index="0"] shape = SubResource( 32 ) diff --git a/prototype/leaders/rollo.tscn b/prototype/leaders/rollo.tscn index 8bf7ffce..b862da13 100644 --- a/prototype/leaders/rollo.tscn +++ b/prototype/leaders/rollo.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=17 format=2] +[gd_scene load_steps=24 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] [ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=2] -[ext_resource path="res://assets/leaders/rollo.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/rollo_blue.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/rollo_red.png" type="Texture" id=4] [sub_resource type="ShaderMaterial" id=30] shader = ExtResource( 2 ) @@ -530,12 +531,50 @@ region = Rect2( 40, 0, 40, 32 ) atlas = ExtResource( 3 ) region = Rect2( 80, 0, 40, 32 ) +[sub_resource type="AtlasTexture" id=38] +atlas = ExtResource( 4 ) +region = Rect2( 0, 0, 40, 32 ) + +[sub_resource type="AtlasTexture" id=39] +atlas = ExtResource( 4 ) +region = Rect2( 40, 0, 40, 32 ) + +[sub_resource type="AtlasTexture" id=40] +atlas = ExtResource( 4 ) +region = Rect2( 80, 0, 40, 32 ) + [sub_resource type="SpriteFrames" id=36] animations = [ { "frames": [ SubResource( 37 ), SubResource( 34 ), SubResource( 35 ) ], "loop": true, "name": "default", "speed": 5.0 +}, { +"frames": [ SubResource( 38 ), SubResource( 39 ), SubResource( 40 ) ], +"loop": true, +"name": "red", +"speed": 5.0 +} ] + +[sub_resource type="AtlasTexture" id=41] +atlas = ExtResource( 3 ) +region = Rect2( 120, 0, 40, 32 ) + +[sub_resource type="AtlasTexture" id=42] +atlas = ExtResource( 4 ) +region = Rect2( 120, 0, 40, 32 ) + +[sub_resource type="SpriteFrames" id=43] +animations = [ { +"frames": [ SubResource( 41 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +}, { +"frames": [ SubResource( 42 ) ], +"loop": true, +"name": "red", +"speed": 5.0 } ] [sub_resource type="CircleShape2D" id=32] @@ -586,25 +625,16 @@ anims/idle = SubResource( 25 ) anims/move = SubResource( 26 ) anims/stun = SubResource( 33 ) -[node name="body" type="AnimatedSprite" parent="sprites" index="1"] -material = SubResource( 30 ) -position = Vector2( 0, 9 ) -rotation = 0.0229965 -scale = Vector2( 1, 0.96706 ) +[node name="body" parent="sprites" index="1"] +visible = true frames = SubResource( 36 ) -frame = 1 +animation = "default" +frame = 2 offset = Vector2( 2, -15 ) -[node name="weapon" type="Sprite" parent="sprites" index="2"] -visible = false -material = SubResource( 30 ) -texture = ExtResource( 3 ) -offset = Vector2( 8, -2 ) -region_enabled = true -region_rect = Rect2( 126, 8, 33, 22 ) - -[node name="sprite" parent="sprites" index="3"] -visible = false +[node name="weapon" type="AnimatedSprite" parent="sprites" index="2"] +frames = SubResource( 43 ) +offset = Vector2( 6, -5 ) [node name="block" parent="collisions" index="0"] shape = SubResource( 32 ) diff --git a/prototype/leaders/sida.tscn b/prototype/leaders/sida.tscn index db5ce721..62681cde 100644 --- a/prototype/leaders/sida.tscn +++ b/prototype/leaders/sida.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=20 format=2] +[gd_scene load_steps=26 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] [ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=2] -[ext_resource path="res://assets/leaders/sida.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/sida_blue.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/sida_red.png" type="Texture" id=4] [sub_resource type="ShaderMaterial" id=30] shader = ExtResource( 2 ) @@ -518,12 +519,29 @@ region = Rect2( 32, 0, 32, 32 ) atlas = ExtResource( 3 ) region = Rect2( 64, 0, 32, 32 ) +[sub_resource type="AtlasTexture" id=45] +atlas = ExtResource( 4 ) +region = Rect2( 0, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=46] +atlas = ExtResource( 4 ) +region = Rect2( 32, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=47] +atlas = ExtResource( 4 ) +region = Rect2( 64, 0, 32, 32 ) + [sub_resource type="SpriteFrames" id=36] animations = [ { "frames": [ SubResource( 40 ), SubResource( 41 ), SubResource( 42 ) ], "loop": true, "name": "default", "speed": 5.0 +}, { +"frames": [ SubResource( 45 ), SubResource( 46 ), SubResource( 47 ) ], +"loop": true, +"name": "red", +"speed": 5.0 } ] [sub_resource type="AtlasTexture" id=43] @@ -534,12 +552,25 @@ region = Rect2( 96, 0, 32, 32 ) atlas = ExtResource( 3 ) region = Rect2( 128, 0, 32, 32 ) +[sub_resource type="AtlasTexture" id=48] +atlas = ExtResource( 4 ) +region = Rect2( 96, 0, 32, 32 ) + +[sub_resource type="AtlasTexture" id=49] +atlas = ExtResource( 4 ) +region = Rect2( 128, 0, 32, 32 ) + [sub_resource type="SpriteFrames" id=39] animations = [ { "frames": [ SubResource( 43 ), SubResource( 44 ) ], "loop": true, "name": "default", "speed": 5.0 +}, { +"frames": [ SubResource( 48 ), SubResource( 49 ) ], +"loop": true, +"name": "red", +"speed": 5.0 } ] [sub_resource type="CircleShape2D" id=32] @@ -594,36 +625,39 @@ anims/idle = SubResource( 25 ) anims/move = SubResource( 26 ) anims/stun = SubResource( 33 ) -[node name="body" type="AnimatedSprite" parent="sprites" index="1"] -material = SubResource( 30 ) -position = Vector2( 0, 9 ) +[node name="body" parent="sprites" index="1"] +visible = true frames = SubResource( 36 ) +animation = "red" +frame = 2 offset = Vector2( 0, -15 ) [node name="weapon" type="Node2D" parent="sprites" index="2"] +use_parent_material = true [node name="spear" type="AnimatedSprite" parent="sprites/weapon" index="0"] -visible = false modulate = Color( 1, 1, 1, 0 ) +use_parent_material = true position = Vector2( -8.1407, 2.05879 ) scale = Vector2( 1, 1.1 ) frames = SubResource( 39 ) +animation = "red" offset = Vector2( 0, -5 ) [node name="projectile" type="Node2D" parent="sprites/weapon" index="1"] +use_parent_material = true position = Vector2( 5, -2 ) z_index = 1 [node name="sprites" type="AnimatedSprite" parent="sprites/weapon/projectile" index="0"] visible = false +use_parent_material = true position = Vector2( 0, 4.76837e-07 ) scale = Vector2( 1, 1.1 ) frames = SubResource( 39 ) +animation = "red" offset = Vector2( -13, -1 ) -[node name="sprite" parent="sprites" index="3"] -visible = false - [node name="block" parent="collisions" index="0"] shape = SubResource( 32 ) diff --git a/prototype/leaders/takoda.tscn b/prototype/leaders/takoda.tscn index 7edc1334..6419cfa2 100644 --- a/prototype/leaders/takoda.tscn +++ b/prototype/leaders/takoda.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=26 format=2] +[gd_scene load_steps=32 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] [ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=2] -[ext_resource path="res://assets/leaders/hongi.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/hongi_blue.png" type="Texture" id=3] [ext_resource path="res://assets/unit/shadow.png" type="Texture" id=4] -[ext_resource path="res://assets/leaders/takoda.png" type="Texture" id=5] +[ext_resource path="res://assets/leaders/takoda_blue.png" type="Texture" id=5] +[ext_resource path="res://assets/leaders/takoda_red.png" type="Texture" id=6] [sub_resource type="ShaderMaterial" id=30] shader = ExtResource( 2 ) @@ -516,12 +517,37 @@ region = Rect2( 144, 0, 48, 48 ) atlas = ExtResource( 5 ) region = Rect2( 192, 0, 48, 48 ) +[sub_resource type="AtlasTexture" id=47] +atlas = ExtResource( 6 ) +region = Rect2( 0, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=48] +atlas = ExtResource( 6 ) +region = Rect2( 48, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=49] +atlas = ExtResource( 6 ) +region = Rect2( 96, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=50] +atlas = ExtResource( 6 ) +region = Rect2( 144, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=51] +atlas = ExtResource( 6 ) +region = Rect2( 192, 0, 48, 48 ) + [sub_resource type="SpriteFrames" id=36] animations = [ { "frames": [ SubResource( 42 ), SubResource( 43 ), SubResource( 44 ), SubResource( 45 ), SubResource( 46 ) ], "loop": true, "name": "default", "speed": 5.0 +}, { +"frames": [ SubResource( 47 ), SubResource( 48 ), SubResource( 49 ), SubResource( 50 ), SubResource( 51 ) ], +"loop": true, +"name": "red", +"speed": 5.0 } ] [sub_resource type="AtlasTexture" id=40] @@ -614,18 +640,20 @@ visible = false [node name="big_shadow" type="Sprite" parent="sprites" index="1"] modulate = Color( 0, 0, 0, 0.294118 ) +light_mask = 0 position = Vector2( 0, 8 ) scale = Vector2( 1.3, 1.4 ) texture = ExtResource( 4 ) -[node name="body" type="AnimatedSprite" parent="sprites" index="2"] -material = SubResource( 30 ) -position = Vector2( 0, 9 ) +[node name="body" parent="sprites" index="2"] +visible = true frames = SubResource( 36 ) +animation = "default" offset = Vector2( 5, -24 ) [node name="axe" type="AnimatedSprite" parent="sprites" index="3"] visible = false +use_parent_material = true position = Vector2( -7.1407, -19.9412 ) rotation = -2.0944 scale = Vector2( 1, 1.069 ) @@ -633,19 +661,19 @@ frames = SubResource( 41 ) offset = Vector2( 6, -4 ) [node name="weapon" type="Node2D" parent="sprites" index="4"] +use_parent_material = true position = Vector2( 0, -25 ) [node name="projectile" type="Node2D" parent="sprites/weapon" index="0"] visible = false +use_parent_material = true position = Vector2( 2.20537e-06, 0 ) z_index = 1 [node name="sprites" type="AnimatedSprite" parent="sprites/weapon/projectile" index="0"] +use_parent_material = true frames = SubResource( 39 ) -[node name="sprite" parent="sprites" index="5"] -visible = false - [node name="block" parent="collisions" index="0"] position = Vector2( 0, -10 ) shape = SubResource( 32 ) diff --git a/prototype/leaders/tomyris.tscn b/prototype/leaders/tomyris.tscn index 6c956d2f..3508054c 100644 --- a/prototype/leaders/tomyris.tscn +++ b/prototype/leaders/tomyris.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=27 format=2] +[gd_scene load_steps=33 format=2] [ext_resource path="res://unit/unit.tscn" type="PackedScene" id=1] [ext_resource path="res://map/tool/color_replace.tres" type="Shader" id=2] -[ext_resource path="res://assets/leaders/robin.png" type="Texture" id=3] +[ext_resource path="res://assets/leaders/robin_blue.png" type="Texture" id=3] [ext_resource path="res://assets/unit/shadow.png" type="Texture" id=4] -[ext_resource path="res://assets/leaders/tomyris.png" type="Texture" id=5] +[ext_resource path="res://assets/leaders/tomyris_blue.png" type="Texture" id=5] +[ext_resource path="res://assets/leaders/tomyris_red.png" type="Texture" id=6] [sub_resource type="ShaderMaterial" id=30] shader = ExtResource( 2 ) @@ -600,12 +601,37 @@ region = Rect2( 144, 0, 48, 48 ) atlas = ExtResource( 5 ) region = Rect2( 192, 0, 48, 48 ) +[sub_resource type="AtlasTexture" id=53] +atlas = ExtResource( 6 ) +region = Rect2( 0, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=54] +atlas = ExtResource( 6 ) +region = Rect2( 48, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=55] +atlas = ExtResource( 6 ) +region = Rect2( 96, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=56] +atlas = ExtResource( 6 ) +region = Rect2( 144, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=57] +atlas = ExtResource( 6 ) +region = Rect2( 192, 0, 48, 48 ) + [sub_resource type="SpriteFrames" id=36] animations = [ { "frames": [ SubResource( 48 ), SubResource( 49 ), SubResource( 50 ), SubResource( 51 ), SubResource( 52 ) ], "loop": true, "name": "default", "speed": 5.0 +}, { +"frames": [ SubResource( 53 ), SubResource( 54 ), SubResource( 55 ), SubResource( 56 ), SubResource( 57 ) ], +"loop": true, +"name": "red", +"speed": 5.0 } ] [sub_resource type="AtlasTexture" id=37] @@ -700,33 +726,36 @@ visible = false [node name="big_shadow" type="Sprite" parent="sprites" index="1"] modulate = Color( 0, 0, 0, 0.294118 ) +light_mask = 0 position = Vector2( 0, 8 ) scale = Vector2( 1.3, 1.4 ) texture = ExtResource( 4 ) -[node name="body" type="AnimatedSprite" parent="sprites" index="2"] -material = SubResource( 30 ) +[node name="body" parent="sprites" index="2"] +visible = true position = Vector2( 3, 9 ) frames = SubResource( 36 ) +animation = "default" offset = Vector2( 2, -24 ) -[node name="sprite" parent="sprites" index="3"] -visible = false - -[node name="weapon" type="Node2D" parent="sprites" index="4"] +[node name="weapon" type="Node2D" parent="sprites" index="3"] +use_parent_material = true position = Vector2( -8, -17 ) scale = Vector2( 1.0686, 1 ) [node name="projectile" type="Node2D" parent="sprites/weapon" index="0"] visible = false +use_parent_material = true position = Vector2( 26, 0 ) [node name="sprites" type="AnimatedSprite" parent="sprites/weapon/projectile" index="0"] +use_parent_material = true frames = SubResource( 44 ) offset = Vector2( -13, -1 ) [node name="bow" type="AnimatedSprite" parent="sprites/weapon" index="1"] visible = false +use_parent_material = true position = Vector2( 4.66035, 1.05636 ) rotation = 0.349066 frames = SubResource( 45 ) diff --git a/prototype/map/fog.gd b/prototype/map/fog.gd deleted file mode 100644 index 6e2de9c4..00000000 --- a/prototype/map/fog.gd +++ /dev/null @@ -1,121 +0,0 @@ -extends TileMap -var game:Node - -var tile_map_size:int -var trees:TileMap - -var clear_skip:int = 16 -var clear_frame:int = 0 - - -func _ready(): - yield(get_tree(), "idle_frame") - game = get_tree().get_current_scene() - - trees = get_node("../trees") - - var tile_size = game.map.get_node("tiles/ground").cell_size.x -# warning-ignore:narrowing_conversion - tile_map_size = floor(game.map.size / tile_size) - - -func skip_start(): - clear_frame = (clear_frame + 1) % clear_skip - if clear_frame % clear_skip == 0 : cover_map() - - -func cover_map(): - for y in floor(tile_map_size): - for x in floor(tile_map_size): - game.map.fog.set_cell(x, y, 0) - - -# computes and caches 2d arrays with circle as booleans eg: -# 00100 -# 01010 -# 10001 -# 01010 -# 00100 -var border_sight_mem:Dictionary = {} -var sight_mem:Dictionary = {} -func compute_sight(unit, border): - var id = game.unit.modifiers.get_value(unit, "vision") - if border: - if id in border_sight_mem: return border_sight_mem[id] - else: - if id in sight_mem: return sight_mem[id] - var a = [] - if id > 0: - var rad = round(id/cell_size.x) - for y in range(0, 2*rad): - a.append([]) - for x in range(0, 2*rad): - var r = Vector2(x-rad, y-rad) - var d = r.length() - if border: - a[a.size()-1].append(d <= rad && d > rad - 1.5) - else: - a[a.size()-1].append(d <= rad) - if border: border_sight_mem[id] = a - else: sight_mem[id] = a - return a - - -func clear_sigh_skip(unit): - if clear_frame % clear_skip == 0 : clear_sight(unit) - - -func clear_sight(unit): - if unit.team == game.player_team: - var id = game.unit.modifiers.get_value(unit, "vision") - var rad = round(id/cell_size.x) - var pos = world_to_map(unit.global_position) - if id > 0: - #if unit.type != "leader": - var a = compute_sight(unit, false) - for y in a.size(): - for x in a[y].size(): - if (a[y][x]): - var p = pos - Vector2(rad,rad) + Vector2(x,y) - game.map.fog.set_cellv(p, -1) - - # adds tree shadows - -# else: -# var a = compute_sight(unit, true) -# for y in a.size(): -# for x in a[y].size(): -# if (a[y][x]): -# var p = pos - Vector2(rad,rad) + Vector2(x,y) -# var line = game.unit.follow.path_finder.expandPath([[pos.x, pos.y], [p.x, p.y]]) -# var blocked = false -# for point in line: -# var point_pos = Vector2(point[0], point[1]) -# var tree = trees.get_cell(point[0]/3, point[1]/3) -# if tree > 0: blocked = true -# if not blocked: game.map.fog.set_cellv(point_pos, -1) -# -# adds sight angle limit -# -# if unit has sight angle: -# var la = PI/6 -# var a = abs(game.utils.limit_angle(r.angle() - unit.angle)) -# if d > rad and a