Skip to content

Commit

Permalink
Ui ก็ยังพัง
Browse files Browse the repository at this point in the history
  • Loading branch information
Krit50322 committed Mar 31, 2022
1 parent 4aea479 commit a4a389a
Show file tree
Hide file tree
Showing 15 changed files with 434 additions and 16 deletions.
5 changes: 5 additions & 0 deletions Global.gd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ var cotton = 0
var thread = 0
var fabric = 0
var shirt = 0
var screened_fabric = 0
var screened_shirt = 0
var color_fabric = 0
var color_shirt = 0
var pack_screened_shirt = 0
var pack_color_shirt = 0
var gridID = []

var allRestNodes: Array
Expand Down
2 changes: 1 addition & 1 deletion Levels/Level2/Level2.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ extends Control


var restNodesPos
var money = 100
var money = 120
var color = 0
var cotton = 10
var thread = 0
Expand Down
15 changes: 15 additions & 0 deletions Levels/Level3/Dye.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
extends Label


# 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.


func _process(delta):
text = "Dye : "+String(Global.color)
6 changes: 3 additions & 3 deletions Levels/Level3/Level3.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ extends Control

var restNodesPos
var money = 100
var color = 0
var cotton = 10
var thread = 0
var color = 3
var cotton = 0
var thread = 20
var fabric = 0
var color_fabric = 0
var RunButton = false
Expand Down
67 changes: 66 additions & 1 deletion Levels/Level3/Level3.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=10 format=2]
[gd_scene load_steps=15 format=2]

[ext_resource path="res://ui-assets/1920x1080_white.svg" type="Texture" id=1]
[ext_resource path="res://ui-assets/building-machinedrawer.svg" type="Texture" id=2]
Expand All @@ -9,6 +9,11 @@
[ext_resource path="res://assets/conveyor_straight.svg" type="Texture" id=7]
[ext_resource path="res://assets/conveyor_curved_ccw.svg" type="Texture" id=8]
[ext_resource path="res://assets/conveyor_curved_cw.svg" type="Texture" id=9]
[ext_resource path="res://Levels/Level3/Dye.gd" type="Script" id=10]
[ext_resource path="res://Levels/Level2/Frabic.gd" type="Script" id=11]
[ext_resource path="res://Levels/Level2/Shirt.gd" type="Script" id=12]
[ext_resource path="res://Levels/Level1/Thread.gd" type="Script" id=13]
[ext_resource path="res://Levels/Level1/money.gd" type="Script" id=14]

[node name="Level3" type="Control"]
anchor_right = 1.0
Expand All @@ -28,6 +33,66 @@ centered = false

[node name="Level3HUD" parent="." instance=ExtResource( 3 )]

[node name="money" type="Label" parent="Level3HUD"]
margin_left = 201.0
margin_top = 70.0
margin_right = 256.0
margin_bottom = 84.0
rect_scale = Vector2( 1.25, 1.25 )
text = "Money : "
script = ExtResource( 14 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Thread" type="Label" parent="Level3HUD"]
margin_left = 201.0
margin_top = 125.0
margin_right = 256.0
margin_bottom = 139.0
rect_scale = Vector2( 1.25, 1.25 )
text = "Thread : "
script = ExtResource( 13 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Frabic" type="Label" parent="Level3HUD"]
margin_left = 201.0
margin_top = 154.0
margin_right = 251.0
margin_bottom = 168.0
rect_scale = Vector2( 1.25, 1.25 )
text = "Fabric : "
script = ExtResource( 11 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Shirt" type="Label" parent="Level3HUD"]
margin_left = 326.0
margin_top = 70.0
margin_right = 367.0
margin_bottom = 84.0
rect_scale = Vector2( 1.25, 1.25 )
text = "Shirt : "
script = ExtResource( 12 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Dye" type="Label" parent="Level3HUD"]
margin_left = 201.0
margin_top = 98.0
margin_right = 241.0
margin_bottom = 112.0
rect_scale = Vector2( 1.25, 1.25 )
text = "Dye : "
script = ExtResource( 10 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Level3Drawer" parent="." instance=ExtResource( 4 )]

[node name="Level3Grid" parent="." instance=ExtResource( 6 )]
Expand Down
15 changes: 15 additions & 0 deletions Levels/Level4/Label.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
extends Label


# 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.


func _process(delta):
text = "Screened shirt : "+String(Global.screened_shirt)
4 changes: 2 additions & 2 deletions Levels/Level4/Level4.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ extends Control
var restNodesPos
var money = 100
var color = 0
var cotton = 10
var thread = 0
var cotton = 0
var thread = 15
var fabric = 0
var color_fabric = 0
var RunButton = false
Expand Down
93 changes: 92 additions & 1 deletion Levels/Level4/Level4.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=10 format=2]
[gd_scene load_steps=17 format=2]

[ext_resource path="res://ui-assets/1920x1080_white.svg" type="Texture" id=1]
[ext_resource path="res://ui-assets/building-machinedrawer.svg" type="Texture" id=2]
Expand All @@ -9,6 +9,13 @@
[ext_resource path="res://assets/conveyor_straight.svg" type="Texture" id=7]
[ext_resource path="res://assets/conveyor_curved_ccw.svg" type="Texture" id=8]
[ext_resource path="res://assets/conveyor_curved_cw.svg" type="Texture" id=9]
[ext_resource path="res://Levels/Level3/Dye.gd" type="Script" id=10]
[ext_resource path="res://Levels/Level2/Frabic.gd" type="Script" id=11]
[ext_resource path="res://Levels/Level2/Shirt.gd" type="Script" id=12]
[ext_resource path="res://Levels/Level1/Thread.gd" type="Script" id=13]
[ext_resource path="res://Levels/Level1/money.gd" type="Script" id=14]
[ext_resource path="res://Levels/Level4/Screenedcloth.gd" type="Script" id=15]
[ext_resource path="res://Levels/Level4/Label.gd" type="Script" id=16]

[node name="Level4" type="Control"]
anchor_right = 1.0
Expand All @@ -28,6 +35,90 @@ centered = false

[node name="Level4HUD" parent="." instance=ExtResource( 3 )]

[node name="money" type="Label" parent="Level4HUD"]
margin_left = 201.0
margin_top = 70.0
margin_right = 256.0
margin_bottom = 84.0
rect_scale = Vector2( 1.25, 1.25 )
text = "Money : "
script = ExtResource( 14 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Thread" type="Label" parent="Level4HUD"]
margin_left = 201.0
margin_top = 125.0
margin_right = 256.0
margin_bottom = 139.0
rect_scale = Vector2( 1.25, 1.25 )
text = "Thread : "
script = ExtResource( 13 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Frabic" type="Label" parent="Level4HUD"]
margin_left = 201.0
margin_top = 154.0
margin_right = 251.0
margin_bottom = 168.0
rect_scale = Vector2( 1.25, 1.25 )
text = "Fabric : "
script = ExtResource( 11 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Shirt" type="Label" parent="Level4HUD"]
margin_left = 326.0
margin_top = 70.0
margin_right = 367.0
margin_bottom = 84.0
rect_scale = Vector2( 1.25, 1.25 )
text = "Shirt : "
script = ExtResource( 12 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Dye" type="Label" parent="Level4HUD"]
margin_left = 201.0
margin_top = 98.0
margin_right = 241.0
margin_bottom = 112.0
rect_scale = Vector2( 1.25, 1.25 )
text = "Dye : "
script = ExtResource( 10 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Screenedcloth" type="Label" parent="Level4HUD"]
margin_left = 326.0
margin_top = 98.0
margin_right = 366.0
margin_bottom = 112.0
rect_scale = Vector2( 1.25, 1.25 )
text = "Screened cloth : "
script = ExtResource( 15 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Screenedshirt" type="Label" parent="Level4HUD"]
margin_left = 326.0
margin_top = 125.0
margin_right = 366.0
margin_bottom = 139.0
rect_scale = Vector2( 1.25, 1.25 )
text = "Screened shirt : "
script = ExtResource( 16 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Level4Drawer" parent="." instance=ExtResource( 4 )]

[node name="Level4Grid" parent="." instance=ExtResource( 6 )]
Expand Down
15 changes: 15 additions & 0 deletions Levels/Level4/Screenedcloth.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
extends Label


# 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.


func _process(delta):
text = "Screened cloth : "+String(Global.screened_fabric)
15 changes: 15 additions & 0 deletions Levels/Level5/Color_shirt.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
extends Label


# 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.


func _process(delta):
text = "Color shirt : "+String(Global.color_shirt)
6 changes: 3 additions & 3 deletions Levels/Level5/Level5.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ extends Control

var restNodesPos
var money = 100
var color = 0
var cotton = 10
var thread = 0
var color = 30
var cotton = 0
var thread = 60
var fabric = 0
var color_fabric = 0
var RunButton = false
Expand Down
Loading

0 comments on commit a4a389a

Please sign in to comment.