Added chits
This commit is contained in:
parent
049f374c5b
commit
aa3e2f6c8c
@ -19,6 +19,7 @@ export(Dictionary) var distribution = {
|
|||||||
export(Array, int) var chits = []
|
export(Array, int) var chits = []
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
|
## Place Tiles
|
||||||
var tiles = []
|
var tiles = []
|
||||||
for tile in distribution:
|
for tile in distribution:
|
||||||
for _i in range(distribution[tile]):
|
for _i in range(distribution[tile]):
|
||||||
@ -33,3 +34,7 @@ func _ready():
|
|||||||
add_child(hex)
|
add_child(hex)
|
||||||
hex.type = tiles.pop_front()
|
hex.type = tiles.pop_front()
|
||||||
hex.index = index
|
hex.index = index
|
||||||
|
if hex.type != "desert":
|
||||||
|
var chit = Chit.new()
|
||||||
|
chit.setup(chits.pop_front())
|
||||||
|
hex.add_child(chit)
|
||||||
|
12
Scripts/Chit.gd
Normal file
12
Scripts/Chit.gd
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
extends Sprite
|
||||||
|
|
||||||
|
class_name Chit
|
||||||
|
|
||||||
|
const CHIT_SCALE = 0.1
|
||||||
|
|
||||||
|
var num = 6
|
||||||
|
|
||||||
|
func setup(num):
|
||||||
|
self.num = num
|
||||||
|
texture = load("res://Assets/%d-chit.png" % num)
|
||||||
|
scale *= CHIT_SCALE
|
@ -1,5 +1,10 @@
|
|||||||
# Hexland Devlog
|
# Hexland Devlog
|
||||||
|
|
||||||
|
## TODO
|
||||||
|
- Order indicies by chit placement (center spiral out)
|
||||||
|
- Docks
|
||||||
|
- Placement on corners
|
||||||
|
|
||||||
## Dane - 08/23/22 @ 2:45 pm
|
## Dane - 08/23/22 @ 2:45 pm
|
||||||
|
|
||||||
A couple of years ago Cole and I make a simple little drag and drop Catan set we called "foreplay". We made it in LOVE, which at the time seemed like a great move until I grew up a little and realized that Godot was infinitely more usable than LOVE.
|
A couple of years ago Cole and I make a simple little drag and drop Catan set we called "foreplay". We made it in LOVE, which at the time seemed like a great move until I grew up a little and realized that Godot was infinitely more usable than LOVE.
|
||||||
|
@ -14,6 +14,11 @@ _global_script_classes=[ {
|
|||||||
"language": "GDScript",
|
"language": "GDScript",
|
||||||
"path": "res://Scripts/Board.gd"
|
"path": "res://Scripts/Board.gd"
|
||||||
}, {
|
}, {
|
||||||
|
"base": "Sprite",
|
||||||
|
"class": "Chit",
|
||||||
|
"language": "GDScript",
|
||||||
|
"path": "res://Scripts/Chit.gd"
|
||||||
|
}, {
|
||||||
"base": "Node2D",
|
"base": "Node2D",
|
||||||
"class": "Hex",
|
"class": "Hex",
|
||||||
"language": "GDScript",
|
"language": "GDScript",
|
||||||
@ -21,6 +26,7 @@ _global_script_classes=[ {
|
|||||||
} ]
|
} ]
|
||||||
_global_script_class_icons={
|
_global_script_class_icons={
|
||||||
"Board": "",
|
"Board": "",
|
||||||
|
"Chit": "",
|
||||||
"Hex": ""
|
"Hex": ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user