mirror of
https://git.kittycat.homes/zoe/pegchamp.git
synced 2024-08-15 03:15:39 +00:00
first commit
This commit is contained in:
commit
fafcbd1530
223 changed files with 107395 additions and 0 deletions
21
Pegs/Purple/PurplePeg.gd
Normal file
21
Pegs/Purple/PurplePeg.gd
Normal file
|
@ -0,0 +1,21 @@
|
|||
extends StaticBody2D
|
||||
|
||||
# turns the pegs green
|
||||
func make_green():
|
||||
# preload a green peg
|
||||
var Green_peg = load("res://Pegs/Green/GreenPeg.tscn")
|
||||
# instance it
|
||||
var green_peg = Green_peg.instance()
|
||||
# take care of positioning
|
||||
# green_peg.rotation = rotation + 5
|
||||
green_peg.global_position = global_position
|
||||
|
||||
# get the main scene of current peg and add new peg to it
|
||||
var main = get_tree().current_scene
|
||||
main.add_child(green_peg)
|
||||
|
||||
#finally delete the old peg
|
||||
queue_free()
|
||||
|
||||
func bouncy():
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue