Started Inventory. CharacterUI mainly done

This commit is contained in:
root 2020-08-31 09:35:52 +02:00
parent a4abb2a452
commit 58ffd327a8
24 changed files with 242 additions and 47 deletions

View File

@ -1,7 +1,16 @@
[gd_resource type="TileSet" load_steps=3 format=2] [gd_resource type="TileSet" load_steps=5 format=2]
[ext_resource path="res://TilesetGodotVloer.png" type="Texture" id=1] [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] [resource]
0/name = "Floor 0" 0/name = "Floor 0"
0/texture = ExtResource( 1 ) 0/texture = ExtResource( 1 )
@ -20,8 +29,26 @@
0/navigation_offset = Vector2( 0, 0 ) 0/navigation_offset = Vector2( 0, 0 )
0/shape_offset = Vector2( 0, 0 ) 0/shape_offset = Vector2( 0, 0 )
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) 0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
0/shape = 0 0/shape = SubResource( 1 )
0/shape_one_way = false 0/shape_one_way = false
0/shape_one_way_margin = 1.0 0/shape_one_way_margin = 1.0
0/shapes = [ ] 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 0/z_index = 0

7
Global.gd Normal file
View File

@ -0,0 +1,7 @@
extends Node2D
var ShowInventory = 0
var LeftClick = 0
func _input(event):
pass

View File

@ -8,13 +8,13 @@ var velocity = Vector2()
func _physics_process(delta): func _physics_process(delta):
velocity.y += delta * GRAVITY velocity.y += delta * GRAVITY
if Input.is_action_pressed("ui_left"): if Input.is_action_pressed("move_left"):
velocity.x = -WALK_SPEED velocity.x = -WALK_SPEED
elif Input.is_action_pressed("ui_right"): elif Input.is_action_pressed("move_right"):
velocity.x = WALK_SPEED velocity.x = WALK_SPEED
elif Input.is_action_pressed("ui_up"): elif Input.is_action_pressed("move_up"):
velocity.y = -WALK_SPEED velocity.y = -WALK_SPEED
elif Input.is_action_pressed("ui_down"): elif Input.is_action_pressed("move_down"):
velocity.y = WALK_SPEED velocity.y = WALK_SPEED
else: else:
velocity.x = 0 velocity.x = 0

13
MiscButtons.gd Normal file
View File

@ -0,0 +1,13 @@
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

19
MiscScenes/Inventory.tscn Normal file
View File

@ -0,0 +1,19 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://pictures/gui/backgrounds/inventory/inventory_background.png" type="Texture" id=1]
[node name="Inventory" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Background" type="TextureRect" parent="."]
margin_right = 1234.0
margin_bottom = 600.0
texture = ExtResource( 1 )
expand = true
__meta__ = {
"_edit_use_anchors_": false
}

BIN
Ring of Races_v01.apk Normal file

Binary file not shown.

BIN
Ring of Races_v02.apk Normal file

Binary file not shown.

BIN
Ring of Races_v03.apk Normal file

Binary file not shown.

View File

@ -1 +1,6 @@
extends TouchScreenButton extends TouchScreenButton
onready var ShowInventory = get_node("res://Global.gd")
func _input(always):
ShowInventory = 1;

Binary file not shown.

Binary file not shown.

View File

@ -7,7 +7,7 @@ custom_features=""
export_filter="all_resources" export_filter="all_resources"
include_filter="" include_filter=""
exclude_filter="" exclude_filter=""
export_path="./Ring of Races_v0.1.apk" export_path="./Ring of Races_v03.apk"
patch_list=PoolStringArray( ) patch_list=PoolStringArray( )
script_export_mode=1 script_export_mode=1
script_encryption_key="" script_encryption_key=""

View File

@ -19,6 +19,16 @@ config/name="Ring of Races demo"
run/main_scene="res://river_intersection_home2.tscn" run/main_scene="res://river_intersection_home2.tscn"
config/icon="res://icon.png" config/icon="res://icon.png"
[autoload]
Global="*res://Global.tscn"
[display]
window/size/width=1234
window/size/resizable=false
window/stretch/mode="2d"
[editor_plugins] [editor_plugins]
enabled=PoolStringArray( "vnen.tiled_importer" ) enabled=PoolStringArray( "vnen.tiled_importer" )
@ -54,10 +64,6 @@ move_down={
pointing/emulate_touch_from_mouse=true pointing/emulate_touch_from_mouse=true
[rendering]
environment/default_environment="res://default_env.tres"
[tiled_importer] [tiled_importer]
enable_json_format=true enable_json_format=true

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long