Added some objects. Changed storage to being in user://storage.db. And cleaned up some mess in the project folder.
This commit is contained in:
parent
285cb8d096
commit
e35ec33079
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="b27f0f04c9409029e4319ecdac5bc483"
|
||||||
|
dest_md5="f3225cdc862d8db7a10ceb9c5791ff0d"
|
||||||
|
|
BIN
.import/Close_icon.png-55bdce32d084d5e5f806a4a5d837ea4b.stex
Normal file
BIN
.import/Close_icon.png-55bdce32d084d5e5f806a4a5d837ea4b.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="b27f0f04c9409029e4319ecdac5bc483"
|
||||||
|
dest_md5="f3225cdc862d8db7a10ceb9c5791ff0d"
|
||||||
|
|
BIN
.import/Close_icon.png-b54c20e3d7876948e2619d202a7ff860.stex
Normal file
BIN
.import/Close_icon.png-b54c20e3d7876948e2619d202a7ff860.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="a0307cd235df0f88aad0fdb7bc651594"
|
||||||
|
dest_md5="0986c8c78779cda268c08ae1475efe4f"
|
||||||
|
|
BIN
.import/Close_icon.svg-52ea6cda93c61dcee0d28e401298ac33.stex
Normal file
BIN
.import/Close_icon.svg-52ea6cda93c61dcee0d28e401298ac33.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="a0307cd235df0f88aad0fdb7bc651594"
|
||||||
|
dest_md5="0986c8c78779cda268c08ae1475efe4f"
|
||||||
|
|
BIN
.import/Close_icon.svg-eb6caf74ca6969dc2a8ada8a0b98f1d5.stex
Normal file
BIN
.import/Close_icon.svg-eb6caf74ca6969dc2a8ada8a0b98f1d5.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="8c94bf3ea485059ed4bc5f4bab7d6d6f"
|
||||||
|
dest_md5="0f633dfaf34d8940fcdef50e44cbb3c8"
|
||||||
|
|
BIN
.import/Connected_icon.png-c73d1a4b9f02f18680734c730ae49bad.stex
Normal file
BIN
.import/Connected_icon.png-c73d1a4b9f02f18680734c730ae49bad.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="8c94bf3ea485059ed4bc5f4bab7d6d6f"
|
||||||
|
dest_md5="0f633dfaf34d8940fcdef50e44cbb3c8"
|
||||||
|
|
BIN
.import/Connected_icon.png-e646ca1b6ff2d860a81b4e89f1619f50.stex
Normal file
BIN
.import/Connected_icon.png-e646ca1b6ff2d860a81b4e89f1619f50.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="767113cd80aa99ac927bf0572f896f7c"
|
||||||
|
dest_md5="8c2ca1e2f3bd54dc48f0a55d7340eb70"
|
||||||
|
|
BIN
.import/Connected_icon.svg-707cb08eb62a72706d3f4012fc932551.stex
Normal file
BIN
.import/Connected_icon.svg-707cb08eb62a72706d3f4012fc932551.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="767113cd80aa99ac927bf0572f896f7c"
|
||||||
|
dest_md5="8c2ca1e2f3bd54dc48f0a55d7340eb70"
|
||||||
|
|
BIN
.import/Connected_icon.svg-91c77637b50d393da88a03a3c4a31090.stex
Normal file
BIN
.import/Connected_icon.svg-91c77637b50d393da88a03a3c4a31090.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="47777692884d4d7c18d524d3259a1fd9"
|
||||||
|
dest_md5="eea0dfc2387f15a912f6cee223a34804"
|
||||||
|
|
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="47777692884d4d7c18d524d3259a1fd9"
|
||||||
|
dest_md5="eea0dfc2387f15a912f6cee223a34804"
|
||||||
|
|
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="88752beb83c598256dbed63f67c743c6"
|
||||||
|
dest_md5="8edca41f84901e7137f7912f1f7aa70f"
|
||||||
|
|
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="88752beb83c598256dbed63f67c743c6"
|
||||||
|
dest_md5="8edca41f84901e7137f7912f1f7aa70f"
|
||||||
|
|
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="7e7db348931b558faf4a0be49bd8c0ae"
|
||||||
|
dest_md5="fb9d8b72ccb4b3e7138cd142c8f02592"
|
||||||
|
|
BIN
.import/Error_icon.png-3624e239c405c48db8ddbf668dd96cf8.stex
Normal file
BIN
.import/Error_icon.png-3624e239c405c48db8ddbf668dd96cf8.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="7e7db348931b558faf4a0be49bd8c0ae"
|
||||||
|
dest_md5="fb9d8b72ccb4b3e7138cd142c8f02592"
|
||||||
|
|
BIN
.import/Error_icon.png-3f424e587d3cb0431a257db9d2ea385d.stex
Normal file
BIN
.import/Error_icon.png-3f424e587d3cb0431a257db9d2ea385d.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="16ad50d5e978dda9d28bfc6891d3655e"
|
||||||
|
dest_md5="2ddce0697f35f3c5d7e8a104b91feccd"
|
||||||
|
|
BIN
.import/Error_icon.svg-b652e469ed1378493bd3d78653637703.stex
Normal file
BIN
.import/Error_icon.svg-b652e469ed1378493bd3d78653637703.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="16ad50d5e978dda9d28bfc6891d3655e"
|
||||||
|
dest_md5="2ddce0697f35f3c5d7e8a104b91feccd"
|
||||||
|
|
BIN
.import/Error_icon.svg-bd5d7e6a237943497a6a099dc1142bda.stex
Normal file
BIN
.import/Error_icon.svg-bd5d7e6a237943497a6a099dc1142bda.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="9fc47cf06d9f2bd549e99568dddb59c1"
|
||||||
|
dest_md5="1350942da534e9db2337690f673e371a"
|
||||||
|
|
BIN
.import/NoSignal.png-27de0974ec5cc467f5b572d6723aefde.stex
Normal file
BIN
.import/NoSignal.png-27de0974ec5cc467f5b572d6723aefde.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="9fc47cf06d9f2bd549e99568dddb59c1"
|
||||||
|
dest_md5="1350942da534e9db2337690f673e371a"
|
||||||
|
|
BIN
.import/NoSignal.png-e023805f34e5041e5ba1f36ae80fcbb2.stex
Normal file
BIN
.import/NoSignal.png-e023805f34e5041e5ba1f36ae80fcbb2.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="3194e8edbc207c9de1bd59313a08af0c"
|
||||||
|
dest_md5="8b056b890dc04c60e6e68a8a183b32c9"
|
||||||
|
|
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="3194e8edbc207c9de1bd59313a08af0c"
|
||||||
|
dest_md5="8b056b890dc04c60e6e68a8a183b32c9"
|
||||||
|
|
Binary file not shown.
@ -1,3 +1,3 @@
|
|||||||
source_md5="d52598a8a89e84715fb6d546c5f39662"
|
source_md5="6e73154777e4e29f1f5252c68abdb0ee"
|
||||||
dest_md5="90266f233d8cca85b2c9efbde06cd9db"
|
dest_md5="90266f233d8cca85b2c9efbde06cd9db"
|
||||||
|
|
||||||
|
1
.import/Planten.tsx-a2548f13f410ce35adeb4accd1545f51.md5
Normal file
1
.import/Planten.tsx-a2548f13f410ce35adeb4accd1545f51.md5
Normal file
@ -0,0 +1 @@
|
|||||||
|
source_md5="6e73154777e4e29f1f5252c68abdb0ee"
|
3
.import/Plants.png-46f428e2f89494bff2313b0041753a5a.md5
Normal file
3
.import/Plants.png-46f428e2f89494bff2313b0041753a5a.md5
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="4333f44e49c639594186e2aa553e4d0c"
|
||||||
|
dest_md5="bd693a17173309ef6507e5d0cba3c8e7"
|
||||||
|
|
BIN
.import/Plants.png-46f428e2f89494bff2313b0041753a5a.stex
Normal file
BIN
.import/Plants.png-46f428e2f89494bff2313b0041753a5a.stex
Normal file
Binary file not shown.
3
.import/Plants.png-ca78568bf73b3fd04504f3b10845bbf2.md5
Normal file
3
.import/Plants.png-ca78568bf73b3fd04504f3b10845bbf2.md5
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="4333f44e49c639594186e2aa553e4d0c"
|
||||||
|
dest_md5="bd693a17173309ef6507e5d0cba3c8e7"
|
||||||
|
|
@ -1 +1 @@
|
|||||||
source_md5="54221ee90979b2a6778bd8491d1d6504"
|
source_md5="2968b4577bc43dd8adca7d7417daad5f"
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="6f0a2c3ecf6f7d3e9d5f30dcb4b55e7d"
|
||||||
|
dest_md5="d7e3377a5ef16e21a4904d6c5978a2d8"
|
||||||
|
|
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="6f0a2c3ecf6f7d3e9d5f30dcb4b55e7d"
|
||||||
|
dest_md5="d7e3377a5ef16e21a4904d6c5978a2d8"
|
||||||
|
|
Binary file not shown.
@ -1 +1 @@
|
|||||||
source_md5="c54c5faceb9c96544ef64b79845cfaaf"
|
source_md5="b3b28d90061530d2748868eebe72c432"
|
||||||
|
1
.import/Vloer.json-612d6c62d415068def370daca363c6b5.md5
Normal file
1
.import/Vloer.json-612d6c62d415068def370daca363c6b5.md5
Normal file
@ -0,0 +1 @@
|
|||||||
|
source_md5="b3b28d90061530d2748868eebe72c432"
|
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="8a7f30aec3d8a0db151973bdc146e11d"
|
||||||
|
dest_md5="6403b3f9919715dea94ef81374688d40"
|
||||||
|
|
BIN
.import/Warning_icon.png-046dee9a61b225c382de7b1172c35232.stex
Normal file
BIN
.import/Warning_icon.png-046dee9a61b225c382de7b1172c35232.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="8a7f30aec3d8a0db151973bdc146e11d"
|
||||||
|
dest_md5="6403b3f9919715dea94ef81374688d40"
|
||||||
|
|
BIN
.import/Warning_icon.png-3b98f3fb52d2ad40673fed73dff42ea6.stex
Normal file
BIN
.import/Warning_icon.png-3b98f3fb52d2ad40673fed73dff42ea6.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="8ea4905105e23bf2630076036d4a0f1a"
|
||||||
|
dest_md5="93175deac4aabc1d2f131acd75168774"
|
||||||
|
|
BIN
.import/Warning_icon.svg-8612a6469d15be0dca595788770de732.stex
Normal file
BIN
.import/Warning_icon.svg-8612a6469d15be0dca595788770de732.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="8ea4905105e23bf2630076036d4a0f1a"
|
||||||
|
dest_md5="93175deac4aabc1d2f131acd75168774"
|
||||||
|
|
BIN
.import/Warning_icon.svg-d7cff469ecb7ebc653295abfc7c04800.stex
Normal file
BIN
.import/Warning_icon.svg-d7cff469ecb7ebc653295abfc7c04800.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="256b9c7ad018bed90cd3cc46b03fc243"
|
||||||
|
dest_md5="2bc7339b012f97a282597f0d5abb7403"
|
||||||
|
|
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="68ac221745addac3f6bbf32240fed0a1"
|
||||||
|
dest_md5="06adbf9007ea3737daf7f905a187687b"
|
||||||
|
|
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="256b9c7ad018bed90cd3cc46b03fc243"
|
||||||
|
dest_md5="2bc7339b012f97a282597f0d5abb7403"
|
||||||
|
|
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="c79d8f1bded9e2fe8e66d7a3c11e71b2"
|
||||||
|
dest_md5="e5a6fc4c859ae1ef9b8ce5ed7e3cb371"
|
||||||
|
|
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="c79d8f1bded9e2fe8e66d7a3c11e71b2"
|
||||||
|
dest_md5="e5a6fc4c859ae1ef9b8ce5ed7e3cb371"
|
||||||
|
|
Binary file not shown.
@ -1 +1 @@
|
|||||||
source_md5="3af91e4cb54b04bab06143224a64c3d0"
|
source_md5="fe61d3487093e148e31b0d00e018566f"
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="747aa450a24118d43c96855d89766ade"
|
||||||
|
dest_md5="4f6390295981357310550e274c51d9d4"
|
||||||
|
|
BIN
.import/settings.png-6d9c781f91272192644ff490c2327ead.stex
Normal file
BIN
.import/settings.png-6d9c781f91272192644ff490c2327ead.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="747aa450a24118d43c96855d89766ade"
|
||||||
|
dest_md5="4f6390295981357310550e274c51d9d4"
|
||||||
|
|
BIN
.import/settings.png-f8eef4d7d1f2459d5277f22ea0ef6cb3.stex
Normal file
BIN
.import/settings.png-f8eef4d7d1f2459d5277f22ea0ef6cb3.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="cc5eefcf4120bd1b2a906adfceba3ca5"
|
||||||
|
dest_md5="40f521ec201ed56eebc6bdc85733bbcf"
|
||||||
|
|
BIN
.import/vegetation.png-38fb7e420053644e9b92d0341dd0fa99.stex
Normal file
BIN
.import/vegetation.png-38fb7e420053644e9b92d0341dd0fa99.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="cc5eefcf4120bd1b2a906adfceba3ca5"
|
||||||
|
dest_md5="40f521ec201ed56eebc6bdc85733bbcf"
|
||||||
|
|
BIN
.import/vegetation.png-64267a98a54c4c80f75c832fa568f12b.stex
Normal file
BIN
.import/vegetation.png-64267a98a54c4c80f75c832fa568f12b.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="cc5eefcf4120bd1b2a906adfceba3ca5"
|
||||||
|
dest_md5="40f521ec201ed56eebc6bdc85733bbcf"
|
||||||
|
|
BIN
.import/vegetation.png-9b7a68023c07aeb73b70da1191b13e9f.stex
Normal file
BIN
.import/vegetation.png-9b7a68023c07aeb73b70da1191b13e9f.stex
Normal file
Binary file not shown.
19
Control.tscn
19
Control.tscn
@ -1,19 +0,0 @@
|
|||||||
[gd_scene load_steps=3 format=2]
|
|
||||||
|
|
||||||
[ext_resource path="res://arrow_down.png" type="Texture" id=1]
|
|
||||||
|
|
||||||
[sub_resource type="GradientTexture" id=1]
|
|
||||||
|
|
||||||
[node name="Control" type="Control"]
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="TouchScreenButton" type="TouchScreenButton" parent="."]
|
|
||||||
position = Vector2( 890.674, 223.37 )
|
|
||||||
scale = Vector2( 4.01662, 3.80615 )
|
|
||||||
normal = ExtResource( 1 )
|
|
||||||
pressed = SubResource( 1 )
|
|
||||||
action = "ui_right"
|
|
54
Floor.tres
54
Floor.tres
@ -1,54 +0,0 @@
|
|||||||
[gd_resource type="TileSet" load_steps=5 format=2]
|
|
||||||
|
|
||||||
[ext_resource path="res://TilesetGodotVloer.png" type="Texture" id=1]
|
|
||||||
|
|
||||||
[sub_resource type="ConcavePolygonShape2D" id=1]
|
|
||||||
segments = PoolVector2Array( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
|
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=2]
|
|
||||||
points = PoolVector2Array( 0, 0, 32, 0, 32, 0, 0, 0 )
|
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=3]
|
|
||||||
points = PoolVector2Array( 0, 0, 32, 0, 32, 0, 0, 0 )
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
0/name = "Floor 0"
|
|
||||||
0/texture = ExtResource( 1 )
|
|
||||||
0/tex_offset = Vector2( 0, 0 )
|
|
||||||
0/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
0/region = Rect2( 0, 0, 2496, 32 )
|
|
||||||
0/tile_mode = 2
|
|
||||||
0/autotile/icon_coordinate = Vector2( 0, 0 )
|
|
||||||
0/autotile/tile_size = Vector2( 32, 32 )
|
|
||||||
0/autotile/spacing = 0
|
|
||||||
0/autotile/occluder_map = [ ]
|
|
||||||
0/autotile/navpoly_map = [ ]
|
|
||||||
0/autotile/priority_map = [ ]
|
|
||||||
0/autotile/z_index_map = [ ]
|
|
||||||
0/occluder_offset = Vector2( 0, 0 )
|
|
||||||
0/navigation_offset = Vector2( 0, 0 )
|
|
||||||
0/shape_offset = Vector2( 0, 0 )
|
|
||||||
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
0/shape = SubResource( 1 )
|
|
||||||
0/shape_one_way = false
|
|
||||||
0/shape_one_way_margin = 1.0
|
|
||||||
0/shapes = [ {
|
|
||||||
"autotile_coord": Vector2( 39, 0 ),
|
|
||||||
"one_way": false,
|
|
||||||
"one_way_margin": 1.0,
|
|
||||||
"shape": SubResource( 1 ),
|
|
||||||
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
}, {
|
|
||||||
"autotile_coord": Vector2( 39, 0 ),
|
|
||||||
"one_way": false,
|
|
||||||
"one_way_margin": 1.0,
|
|
||||||
"shape": SubResource( 2 ),
|
|
||||||
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
}, {
|
|
||||||
"autotile_coord": Vector2( 40, 0 ),
|
|
||||||
"one_way": false,
|
|
||||||
"one_way_margin": 1.0,
|
|
||||||
"shape": SubResource( 3 ),
|
|
||||||
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
} ]
|
|
||||||
0/z_index = 0
|
|
@ -1,71 +0,0 @@
|
|||||||
extends KinematicBody2D
|
|
||||||
|
|
||||||
const GRAVITY = 0.0
|
|
||||||
const WALK_SPEED = 200
|
|
||||||
const interaction_circle_size = 150
|
|
||||||
onready var background_map = get_node("/root/Map1/background")
|
|
||||||
onready var player = get_node("/root/Map1/Player")
|
|
||||||
onready var cell_size = background_map._get_cell_size()
|
|
||||||
onready var plants_map = get_node("/root/Map1/interaction_map")
|
|
||||||
onready var interaction = get_node("/root/Map1/player_interaction")
|
|
||||||
|
|
||||||
var velocity = Vector2()
|
|
||||||
var world_position
|
|
||||||
|
|
||||||
#Moving buttons
|
|
||||||
func _physics_process(delta):
|
|
||||||
if Input.is_key_pressed(KEY_SPACE) or Input.is_mouse_button_pressed(BUTTON_LEFT):
|
|
||||||
_interaction_process()
|
|
||||||
velocity.y += delta * GRAVITY
|
|
||||||
if Input.is_action_pressed("move_left"):
|
|
||||||
velocity.x = -WALK_SPEED
|
|
||||||
elif Input.is_action_pressed("move_right"):
|
|
||||||
velocity.x = WALK_SPEED
|
|
||||||
elif Input.is_action_pressed("move_up"):
|
|
||||||
velocity.y = -WALK_SPEED
|
|
||||||
elif Input.is_action_pressed("move_down"):
|
|
||||||
velocity.y = WALK_SPEED
|
|
||||||
else:
|
|
||||||
velocity.x = 0
|
|
||||||
velocity.y = 0
|
|
||||||
move_and_slide(velocity, Vector2(0, -1))
|
|
||||||
Global.current_camera.Update()
|
|
||||||
# if(interaction.get_cell(int(self.position.x / cell_size.x), int(self.position.y / cell_size.y)) == -1):
|
|
||||||
# interaction.clear()
|
|
||||||
# interaction.set_cell(int(self.position.x / cell_size.x), int(self.position.y / cell_size.y), 0)
|
|
||||||
|
|
||||||
func InteractWithCell():
|
|
||||||
var plant_cell_mouse = plants_map.get_cell(int(world_position[0] / cell_size.x), int(world_position[1] / cell_size.y))
|
|
||||||
var plant_cell_character = plants_map.get_cell(int(self.position.x / cell_size.x), int(self.position.y / cell_size.y))
|
|
||||||
|
|
||||||
var background_cell = background_map.get_cell(int(world_position[0] / cell_size.x), int(world_position[1] / cell_size.y))
|
|
||||||
var interaction_cell = interaction.get_cell(int(world_position[0] / cell_size.x), int(world_position[1] / cell_size.y))
|
|
||||||
if plant_cell_mouse > 0 and plant_cell_mouse % 2 == 0:
|
|
||||||
Global.AddInventoryItem(3, 1)
|
|
||||||
plants_map.set_cell(int(world_position[0] / cell_size.x), int(world_position[1] / cell_size.y), (plant_cell_mouse-1))
|
|
||||||
AnimationOnInteraction(1)
|
|
||||||
elif plant_cell_character > 0 and plant_cell_character % 2 == 0:
|
|
||||||
Global.AddInventoryItem(3, 1)
|
|
||||||
plants_map.set_cell(int(self.position.x / cell_size.x), int(self.position.y / cell_size.y), (plant_cell_character-1))
|
|
||||||
AnimationOnInteraction(1)
|
|
||||||
|
|
||||||
func _interaction_process():
|
|
||||||
if Input.is_key_pressed(KEY_SPACE) or Input.is_mouse_button_pressed(BUTTON_LEFT):
|
|
||||||
world_position = get_global_mouse_position()
|
|
||||||
InteractWithCell()
|
|
||||||
|
|
||||||
func _input(event):
|
|
||||||
pass
|
|
||||||
|
|
||||||
func AnimationOnInteraction(Item):
|
|
||||||
print("Item = ", Item, " Animation")
|
|
||||||
var itemimage = TextureRect.new()
|
|
||||||
itemimage.texture = load("res://pictures/inventory_iconpictures/food_items/herbs/saffron.png")
|
|
||||||
itemimage.set_position(Vector2(randf()*20-40, randf()*40-20))
|
|
||||||
add_child(itemimage)
|
|
||||||
yield(get_tree().create_timer(1.0), "timeout")
|
|
||||||
remove_child(itemimage)
|
|
||||||
|
|
||||||
func _ready():
|
|
||||||
Global.player_inventory_items = Database.GetInventoryItems()
|
|
||||||
|
|
9
Menu.gd
9
Menu.gd
@ -1,9 +0,0 @@
|
|||||||
extends Node2D
|
|
||||||
|
|
||||||
func _ready():
|
|
||||||
pass # Replace with function body.
|
|
||||||
|
|
||||||
func _on_Btn_PlayGame_pressed():
|
|
||||||
Global.LoadSave()
|
|
||||||
Global.GoToScene("river_intersection_home_2")
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
|||||||
extends Button
|
|
||||||
|
|
||||||
|
|
||||||
# Declare member variables here. Examples:
|
|
||||||
# var a = 2
|
|
||||||
# var b = "text"
|
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready():
|
|
||||||
pass # Replace with function body.
|
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
#func _process(delta):
|
|
||||||
# pass
|
|
@ -1,27 +0,0 @@
|
|||||||
extends Button
|
|
||||||
|
|
||||||
|
|
||||||
# Declare member variables here. Examples:
|
|
||||||
# var a = 2
|
|
||||||
# var b = "text"
|
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready():
|
|
||||||
|
|
||||||
pass # Replace with function body.
|
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
#func _process(delta):
|
|
||||||
# pass
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _on_Button_gui_input(event):
|
|
||||||
print(event)
|
|
||||||
if event == InputEventScreenTouch.CONNECT_ONESHOT:
|
|
||||||
get_tree().change_scene("res://river_intersection_home2.tscn")
|
|
||||||
|
|
||||||
# get_tree().change_scene("res://river_intersection_home2.tscn")
|
|
||||||
pass # Replace with function body.
|
|
@ -1,14 +0,0 @@
|
|||||||
extends TouchScreenButton
|
|
||||||
|
|
||||||
#func _input(always):
|
|
||||||
func _physics_process(delta):
|
|
||||||
if Input.is_action_pressed("move_left") and Input.is_action_pressed("move_right"):
|
|
||||||
show()
|
|
||||||
elif Input.is_action_pressed("ui_end"):
|
|
||||||
hide()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
#func _process(delta):
|
|
||||||
# pass
|
|
@ -1,3 +0,0 @@
|
|||||||
[gd_resource type="TileSet" format=2]
|
|
||||||
|
|
||||||
[resource]
|
|
36
Planten.tsx
36
Planten.tsx
@ -1,36 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<tileset version="1.4" tiledversion="1.4.2" name="Planten" tilewidth="32" tileheight="32" tilecount="11" columns="0">
|
|
||||||
<tile id="0">
|
|
||||||
<image width="32" height="32" source="omgeving/Planten/raspberry_bush1.png"/>
|
|
||||||
</tile>
|
|
||||||
<tile id="1">
|
|
||||||
<image width="32" height="32" source="omgeving/Planten/raspberry_bush2.png"/>
|
|
||||||
</tile>
|
|
||||||
<tile id="2" probability="0.25">
|
|
||||||
<image width="32" height="32" source="omgeving/Planten/gras_met_rozen1.png"/>
|
|
||||||
</tile>
|
|
||||||
<tile id="3" probability="0.25">
|
|
||||||
<image width="32" height="32" source="omgeving/Planten/gras_met_rozen2.png"/>
|
|
||||||
</tile>
|
|
||||||
<tile id="4" probability="0.25">
|
|
||||||
<image width="32" height="32" source="omgeving/Planten/gras_met_rozen3.png"/>
|
|
||||||
</tile>
|
|
||||||
<tile id="5">
|
|
||||||
<image width="32" height="32" source="omgeving/Planten/gras1.png"/>
|
|
||||||
</tile>
|
|
||||||
<tile id="6">
|
|
||||||
<image width="32" height="32" source="omgeving/Planten/gras2.png"/>
|
|
||||||
</tile>
|
|
||||||
<tile id="7">
|
|
||||||
<image width="32" height="32" source="omgeving/Planten/gras3.png"/>
|
|
||||||
</tile>
|
|
||||||
<tile id="8">
|
|
||||||
<image width="32" height="32" source="omgeving/Planten/gras4.png"/>
|
|
||||||
</tile>
|
|
||||||
<tile id="9">
|
|
||||||
<image width="32" height="32" source="omgeving/Planten/gras5.png"/>
|
|
||||||
</tile>
|
|
||||||
<tile id="10">
|
|
||||||
<image width="32" height="32" source="omgeving/Planten/gras6.png"/>
|
|
||||||
</tile>
|
|
||||||
</tileset>
|
|
@ -1,20 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="vnen.tiled_tileset_importer"
|
|
||||||
type="TileSet"
|
|
||||||
path="res://.import/Planten.tsx-3f28d8cc540c4e311e79241d37171d81.res"
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://Planten.tsx"
|
|
||||||
dest_files=[ "res://.import/Planten.tsx-3f28d8cc540c4e311e79241d37171d81.res" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
custom_properties=true
|
|
||||||
tile_metadata=false
|
|
||||||
image_flags=7
|
|
||||||
embed_internal_images=false
|
|
||||||
save_tiled_properties=false
|
|
||||||
apply_offset=false
|
|
||||||
post_import_script=""
|
|
BIN
Plants.png
BIN
Plants.png
Binary file not shown.
Before Width: | Height: | Size: 5.3 KiB |
@ -1,34 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/Plants.png-112437b827aede75aff07b4001ecaab2.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://Plants.png"
|
|
||||||
dest_files=[ "res://.import/Plants.png-112437b827aede75aff07b4001ecaab2.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
180
Plants.tres
180
Plants.tres
@ -1,180 +0,0 @@
|
|||||||
[gd_resource type="TileSet" load_steps=2 format=2]
|
|
||||||
|
|
||||||
[ext_resource path="res://Plants.png" type="Texture" id=1]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
0/name = "Plants.png 0"
|
|
||||||
0/texture = ExtResource( 1 )
|
|
||||||
0/tex_offset = Vector2( 0, 0 )
|
|
||||||
0/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
0/region = Rect2( 32, 0, 32, 32 )
|
|
||||||
0/tile_mode = 2
|
|
||||||
0/autotile/icon_coordinate = Vector2( 0, 0 )
|
|
||||||
0/autotile/tile_size = Vector2( 32, 32 )
|
|
||||||
0/autotile/spacing = 0
|
|
||||||
0/autotile/occluder_map = [ ]
|
|
||||||
0/autotile/navpoly_map = [ ]
|
|
||||||
0/autotile/priority_map = [ Vector3( 1, 0, 2 ) ]
|
|
||||||
0/autotile/z_index_map = [ Vector3( 0, 0, 1 ), Vector3( 1, 0, 1 ), Vector3( 2, 0, 2 ) ]
|
|
||||||
0/occluder_offset = Vector2( 0, 0 )
|
|
||||||
0/navigation_offset = Vector2( 0, 0 )
|
|
||||||
0/shape_offset = Vector2( 0, 0 )
|
|
||||||
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
0/shape_one_way = false
|
|
||||||
0/shape_one_way_margin = 0.0
|
|
||||||
0/shapes = [ ]
|
|
||||||
0/z_index = 0
|
|
||||||
1/name = "Plants.png 1"
|
|
||||||
1/texture = ExtResource( 1 )
|
|
||||||
1/tex_offset = Vector2( 0, 0 )
|
|
||||||
1/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
1/region = Rect2( 32, 0, 32, 32 )
|
|
||||||
1/tile_mode = 0
|
|
||||||
1/occluder_offset = Vector2( 0, 0 )
|
|
||||||
1/navigation_offset = Vector2( 0, 0 )
|
|
||||||
1/shape_offset = Vector2( 0, 0 )
|
|
||||||
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
1/shape_one_way = false
|
|
||||||
1/shape_one_way_margin = 0.0
|
|
||||||
1/shapes = [ ]
|
|
||||||
1/z_index = 0
|
|
||||||
2/name = "Plants.png 2"
|
|
||||||
2/texture = ExtResource( 1 )
|
|
||||||
2/tex_offset = Vector2( 0, 0 )
|
|
||||||
2/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
2/region = Rect2( 64, 0, 32, 32 )
|
|
||||||
2/tile_mode = 0
|
|
||||||
2/occluder_offset = Vector2( 0, 0 )
|
|
||||||
2/navigation_offset = Vector2( 0, 0 )
|
|
||||||
2/shape_offset = Vector2( 0, 0 )
|
|
||||||
2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
2/shape_one_way = false
|
|
||||||
2/shape_one_way_margin = 0.0
|
|
||||||
2/shapes = [ ]
|
|
||||||
2/z_index = 0
|
|
||||||
3/name = "Plants.png 3"
|
|
||||||
3/texture = ExtResource( 1 )
|
|
||||||
3/tex_offset = Vector2( 0, 0 )
|
|
||||||
3/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
3/region = Rect2( 96, 0, 32, 32 )
|
|
||||||
3/tile_mode = 0
|
|
||||||
3/occluder_offset = Vector2( 0, 0 )
|
|
||||||
3/navigation_offset = Vector2( 0, 0 )
|
|
||||||
3/shape_offset = Vector2( 0, 0 )
|
|
||||||
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
3/shape_one_way = false
|
|
||||||
3/shape_one_way_margin = 0.0
|
|
||||||
3/shapes = [ ]
|
|
||||||
3/z_index = 0
|
|
||||||
4/name = "Plants.png 4"
|
|
||||||
4/texture = ExtResource( 1 )
|
|
||||||
4/tex_offset = Vector2( 0, 0 )
|
|
||||||
4/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
4/region = Rect2( 0, 0, 32, 32 )
|
|
||||||
4/tile_mode = 0
|
|
||||||
4/occluder_offset = Vector2( 0, 0 )
|
|
||||||
4/navigation_offset = Vector2( 0, 0 )
|
|
||||||
4/shape_offset = Vector2( 0, 0 )
|
|
||||||
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
4/shape_one_way = false
|
|
||||||
4/shape_one_way_margin = 0.0
|
|
||||||
4/shapes = [ ]
|
|
||||||
4/z_index = 0
|
|
||||||
5/name = "Plants.png 5"
|
|
||||||
5/texture = ExtResource( 1 )
|
|
||||||
5/tex_offset = Vector2( 0, 0 )
|
|
||||||
5/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
5/region = Rect2( 128, 0, 32, 32 )
|
|
||||||
5/tile_mode = 0
|
|
||||||
5/occluder_offset = Vector2( 0, 0 )
|
|
||||||
5/navigation_offset = Vector2( 0, 0 )
|
|
||||||
5/shape_offset = Vector2( 0, 0 )
|
|
||||||
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
5/shape_one_way = false
|
|
||||||
5/shape_one_way_margin = 0.0
|
|
||||||
5/shapes = [ ]
|
|
||||||
5/z_index = 0
|
|
||||||
6/name = "Plants.png 6"
|
|
||||||
6/texture = ExtResource( 1 )
|
|
||||||
6/tex_offset = Vector2( 0, 0 )
|
|
||||||
6/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
6/region = Rect2( 160, 0, 32, 32 )
|
|
||||||
6/tile_mode = 0
|
|
||||||
6/occluder_offset = Vector2( 0, 0 )
|
|
||||||
6/navigation_offset = Vector2( 0, 0 )
|
|
||||||
6/shape_offset = Vector2( 0, 0 )
|
|
||||||
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
6/shape_one_way = false
|
|
||||||
6/shape_one_way_margin = 0.0
|
|
||||||
6/shapes = [ ]
|
|
||||||
6/z_index = 0
|
|
||||||
7/name = "Plants.png 7"
|
|
||||||
7/texture = ExtResource( 1 )
|
|
||||||
7/tex_offset = Vector2( 0, 0 )
|
|
||||||
7/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
7/region = Rect2( 192, 0, 32, 32 )
|
|
||||||
7/tile_mode = 0
|
|
||||||
7/occluder_offset = Vector2( 0, 0 )
|
|
||||||
7/navigation_offset = Vector2( 0, 0 )
|
|
||||||
7/shape_offset = Vector2( 0, 0 )
|
|
||||||
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
7/shape_one_way = false
|
|
||||||
7/shape_one_way_margin = 0.0
|
|
||||||
7/shapes = [ ]
|
|
||||||
7/z_index = 0
|
|
||||||
8/name = "Plants.png 8"
|
|
||||||
8/texture = ExtResource( 1 )
|
|
||||||
8/tex_offset = Vector2( 0, 0 )
|
|
||||||
8/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
8/region = Rect2( 224, 0, 32, 32 )
|
|
||||||
8/tile_mode = 0
|
|
||||||
8/occluder_offset = Vector2( 0, 0 )
|
|
||||||
8/navigation_offset = Vector2( 0, 0 )
|
|
||||||
8/shape_offset = Vector2( 0, 0 )
|
|
||||||
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
8/shape_one_way = false
|
|
||||||
8/shape_one_way_margin = 0.0
|
|
||||||
8/shapes = [ ]
|
|
||||||
8/z_index = 0
|
|
||||||
9/name = "Plants.png 9"
|
|
||||||
9/texture = ExtResource( 1 )
|
|
||||||
9/tex_offset = Vector2( 0, 0 )
|
|
||||||
9/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
9/region = Rect2( 256, 0, 32, 32 )
|
|
||||||
9/tile_mode = 0
|
|
||||||
9/occluder_offset = Vector2( 0, 0 )
|
|
||||||
9/navigation_offset = Vector2( 0, 0 )
|
|
||||||
9/shape_offset = Vector2( 0, 0 )
|
|
||||||
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
9/shape_one_way = false
|
|
||||||
9/shape_one_way_margin = 0.0
|
|
||||||
9/shapes = [ ]
|
|
||||||
9/z_index = 0
|
|
||||||
10/name = "Plants.png 10"
|
|
||||||
10/texture = ExtResource( 1 )
|
|
||||||
10/tex_offset = Vector2( 0, 0 )
|
|
||||||
10/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
10/region = Rect2( 288, 0, 32, 32 )
|
|
||||||
10/tile_mode = 0
|
|
||||||
10/occluder_offset = Vector2( 0, 0 )
|
|
||||||
10/navigation_offset = Vector2( 0, 0 )
|
|
||||||
10/shape_offset = Vector2( 0, 0 )
|
|
||||||
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
10/shape_one_way = false
|
|
||||||
10/shape_one_way_margin = 0.0
|
|
||||||
10/shapes = [ ]
|
|
||||||
10/z_index = 0
|
|
||||||
11/name = "Plants.png 11"
|
|
||||||
11/texture = ExtResource( 1 )
|
|
||||||
11/tex_offset = Vector2( 0, 0 )
|
|
||||||
11/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
11/region = Rect2( 320, 0, 32, 32 )
|
|
||||||
11/tile_mode = 0
|
|
||||||
11/occluder_offset = Vector2( 0, 0 )
|
|
||||||
11/navigation_offset = Vector2( 0, 0 )
|
|
||||||
11/shape_offset = Vector2( 0, 0 )
|
|
||||||
11/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
11/shape_one_way = false
|
|
||||||
11/shape_one_way_margin = 0.0
|
|
||||||
11/shapes = [ ]
|
|
||||||
11/z_index = 0
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,64 +0,0 @@
|
|||||||
[gd_scene load_steps=5 format=2]
|
|
||||||
|
|
||||||
[ext_resource path="res://pictures/gui/backgrounds/inventory/inventory_background.png" type="Texture" id=1]
|
|
||||||
[ext_resource path="res://Scenes/Inventory_Script.gd" type="Script" id=2]
|
|
||||||
[ext_resource path="res://Scenes/TextureRect2.gd" type="Script" id=4]
|
|
||||||
|
|
||||||
[sub_resource type="GDScript" id=1]
|
|
||||||
script/source = "extends Node2D
|
|
||||||
|
|
||||||
#func _draw():
|
|
||||||
# var center = Vector2(200, 200)
|
|
||||||
# var radius = 80
|
|
||||||
# var angle_from = 75
|
|
||||||
# var angle_to = 195
|
|
||||||
# var color = Color(1.0, 0.0, 0.0)
|
|
||||||
# draw_circle_arc(center, radius, angle_from, angle_to, color)
|
|
||||||
#
|
|
||||||
#func draw_circle_arc(center, radius, angle_from, angle_to, color):
|
|
||||||
# var nb_points = 32
|
|
||||||
# var points_arc = PoolVector2Array()
|
|
||||||
#
|
|
||||||
# for i in range(nb_points + 1):
|
|
||||||
# var angle_point = deg2rad(angle_from + i * (angle_to-angle_from) / nb_points - 90)
|
|
||||||
# points_arc.push_back(center + Vector2(cos(angle_point), sin(angle_point)) * radius)
|
|
||||||
#
|
|
||||||
# for index_point in range(nb_points):
|
|
||||||
# draw_line(points_arc[index_point], points_arc[index_point + 1], color)
|
|
||||||
|
|
||||||
func _ready():
|
|
||||||
pass # Replace with function body.
|
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
#func _process(delta):
|
|
||||||
# pass
|
|
||||||
"
|
|
||||||
|
|
||||||
[node name="Inventory" type="Node2D"]
|
|
||||||
z_index = 1
|
|
||||||
script = SubResource( 1 )
|
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="."]
|
|
||||||
margin_right = 40.0
|
|
||||||
margin_bottom = 40.0
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="inventory_background" type="Sprite" parent="TextureRect"]
|
|
||||||
position = Vector2( 617.053, 299.964 )
|
|
||||||
scale = Vector2( 3.08457, 1.99938 )
|
|
||||||
z_index = -1
|
|
||||||
texture = ExtResource( 1 )
|
|
||||||
script = ExtResource( 2 )
|
|
||||||
|
|
||||||
[node name="TextureRect2" type="TextureRect" parent="TextureRect/inventory_background"]
|
|
||||||
margin_left = -200.045
|
|
||||||
margin_top = -150.028
|
|
||||||
margin_right = -160.045
|
|
||||||
margin_bottom = -110.028
|
|
||||||
script = ExtResource( 4 )
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
@ -1,41 +0,0 @@
|
|||||||
extends Sprite
|
|
||||||
|
|
||||||
var items = [1,2,3]
|
|
||||||
|
|
||||||
func draw_circle_arc(center, radius, angle_from, angle_to, color):
|
|
||||||
var nb_points = 32
|
|
||||||
var points_arc = PoolVector2Array()
|
|
||||||
|
|
||||||
for i in range(nb_points + 1):
|
|
||||||
var angle_point = deg2rad(angle_from + i * (angle_to-angle_from) / nb_points - 90)
|
|
||||||
points_arc.push_back(center + Vector2(cos(angle_point), sin(angle_point)) * radius)
|
|
||||||
|
|
||||||
for index_point in range(nb_points):
|
|
||||||
draw_line(points_arc[index_point], points_arc[index_point + 1], color)
|
|
||||||
|
|
||||||
func draw_circle_arc_poly(center, radius, angle_from, angle_to, color):
|
|
||||||
var nb_points = 32
|
|
||||||
var points_arc = PoolVector2Array()
|
|
||||||
points_arc.push_back(center)
|
|
||||||
var colors = PoolColorArray([color])
|
|
||||||
|
|
||||||
for i in range(nb_points + 1):
|
|
||||||
var angle_point = deg2rad(angle_from + i * (angle_to - angle_from) / nb_points - 90)
|
|
||||||
points_arc.push_back(center + Vector2(cos(angle_point), sin(angle_point)) * radius)
|
|
||||||
draw_polygon(points_arc, colors)
|
|
||||||
|
|
||||||
func _draw():
|
|
||||||
var center = Vector2(200, 200)
|
|
||||||
var radius = 80
|
|
||||||
var angle_from = 75
|
|
||||||
var angle_to = 195
|
|
||||||
var color = Color(1.0, 0.0, 0.0)
|
|
||||||
draw_circle_arc_poly(center, radius, angle_from, angle_to, color)
|
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready():
|
|
||||||
_draw()
|
|
||||||
# for x in range(len(items)):
|
|
||||||
# _draw()
|
|
||||||
pass # Replace with function body.
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user