Wand GUI actually OwOrks
This commit is contained in:
parent
c9c38d74e1
commit
7d75716ddf
BIN
art/BouncingWand.png
Normal file
BIN
art/BouncingWand.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 200 B |
34
art/BouncingWand.png.import
Normal file
34
art/BouncingWand.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/BouncingWand.png-d76cd452685fd41e38fa049fbf83cab0.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/BouncingWand.png"
|
||||
dest_files=[ "res://.import/BouncingWand.png-d76cd452685fd41e38fa049fbf83cab0.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=false
|
||||
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=false
|
||||
svg/scale=1.0
|
BIN
art/PrismaticWand.png
Normal file
BIN
art/PrismaticWand.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 190 B |
34
art/PrismaticWand.png.import
Normal file
34
art/PrismaticWand.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/PrismaticWand.png-c8dd0c050ab323afacd18c0c1831c3cb.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/PrismaticWand.png"
|
||||
dest_files=[ "res://.import/PrismaticWand.png-c8dd0c050ab323afacd18c0c1831c3cb.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=false
|
||||
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=false
|
||||
svg/scale=1.0
|
|
@ -89,6 +89,7 @@ position = Vector2( 0, -7 )
|
|||
script = ExtResource( 7 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
visible = false
|
||||
position = Vector2( 0, -12 )
|
||||
texture = ExtResource( 6 )
|
||||
vframes = 3
|
||||
|
@ -124,4 +125,3 @@ position = Vector2( 0, -7 )
|
|||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hitbox"]
|
||||
visible = false
|
||||
polygon = PoolVector2Array( -6, -12, -6, -5, -7, -5, -7, -3, -6, -3, -6, 2, -5, 2, -5, 4, -6, 4, -6, 5, -7, 5, -7, 7, 5, 7, 5, 3, 6, 3, 6, -1, 5, -1, 5, -2, 6, -2, 6, -3, 7, -3, 7, -5, 6, -5, 6, -6, 5, -6, 5, -7, 4, -7, 4, -8, 3, -8, 3, -9, 1, -9, 1, -10, -3, -10, -3, -11, -4, -11, -4, -12, -6, -12 )
|
||||
[connection signal="grounded_updated" from="." to="Camera" method="_on_grounded_updated"]
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://script/BasicWand.gd" type="Script" id=1]
|
||||
[ext_resource path="res://art/Wand.png" type="Texture" id=2]
|
||||
|
||||
[node name="Wand" type="Sprite"]
|
||||
position = Vector2( 7, 0 )
|
||||
rotation = 1.5708
|
||||
texture = ExtResource( 2 )
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="ProjectileSpawn" type="Position2D" parent="."]
|
||||
position = Vector2( -6.11959e-07, -7 )
|
||||
|
||||
[node name="ShootDelay" type="Timer" parent="."]
|
||||
wait_time = 0.3
|
||||
one_shot = true
|
|
@ -1,6 +1,7 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://art/BouncyWand.png" type="Texture" id=1]
|
||||
[ext_resource path="res://art/BouncingWand.png" type="Texture" id=1]
|
||||
|
||||
|
||||
[node name="BouncyWand" type="Sprite"]
|
||||
rotation = 1.5708
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://script/BasicWand.gd" type="Script" id=1]
|
||||
[ext_resource path="res://art/Wand.png" type="Texture" id=2]
|
||||
|
||||
[node name="Conduit1" type="Sprite"]
|
||||
[node name="ChargedWand" type="Sprite"]
|
||||
position = Vector2( 7, 0 )
|
||||
rotation = 1.5708
|
||||
texture = ExtResource( 2 )
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="ProjectileSpawn" type="Position2D" parent="."]
|
||||
position = Vector2( -6.11959e-07, -7 )
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://art/PrismWand.png" type="Texture" id=1]
|
||||
[ext_resource path="res://art/PrismaticWand.png" type="Texture" id=1]
|
||||
|
||||
|
||||
[node name="PrismWand" type="Sprite"]
|
||||
rotation = 1.5708
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
extends Sprite
|
||||
|
||||
onready var ShootDelay : Timer = $ShootDelay
|
||||
onready var ProjectileSpawn : Position2D = $ProjectileSpawn
|
||||
onready var Player = get_parent().get_parent()
|
||||
|
||||
var projectile_ps = Globals.WHITE_PROJECTILE_PS
|
||||
|
||||
func fire_projectile(rot):
|
||||
if ShootDelay.is_stopped() and Player.energy != 0:
|
||||
Player.Stats.interrupt_regen()
|
||||
Player.energy -= 1
|
||||
var temp = projectile_ps.instance()
|
||||
get_tree().current_scene.add_child(temp)
|
||||
temp.global_position = ProjectileSpawn.global_position
|
||||
temp.rotation_degrees = rot
|
||||
temp.launch()
|
||||
ShootDelay.start()
|
|
@ -71,19 +71,22 @@ func add_item(index):
|
|||
Globals.Conduit4:
|
||||
Effect4.visible = true
|
||||
|
||||
func _on_Conduit1_toggled(button_pressed):
|
||||
if button_pressed and Conduit1.is_visible():
|
||||
func _on_Conduit1_toggled():
|
||||
if Conduit1.is_visible():
|
||||
active_conduit = Globals.Magic[Globals.Conduit1]
|
||||
print(active_conduit)
|
||||
parent.WandManager.set_current_conduit(active_conduit)
|
||||
else:
|
||||
parent.WandManager.clear_conduit()
|
||||
|
||||
|
||||
func _on_Conduit2_toggled(button_pressed):
|
||||
if button_pressed and Conduit2.is_visible():
|
||||
func _on_Conduit2_toggled():
|
||||
if Conduit2.is_visible():
|
||||
active_conduit = Globals.Magic[Globals.Conduit2]
|
||||
print(active_conduit)
|
||||
parent.WandManager.set_current_conduit(active_conduit)
|
||||
else:
|
||||
parent.WandManager.clear_conduit()
|
||||
|
||||
func _on_Conduit3_toggled():
|
||||
if Conduit3.is_visible():
|
||||
active_conduit = Globals.Magic[Globals.Conduit3]
|
||||
parent.WandManager.set_current_conduit(active_conduit)
|
||||
|
||||
func _on_Conduit4_toggled():
|
||||
if Conduit4.is_visible():
|
||||
active_conduit = Globals.Magic[Globals.Conduit4]
|
||||
parent.WandManager.set_current_conduit(active_conduit)
|
||||
|
|
|
@ -9,8 +9,8 @@ const TILE_SIZE = 16
|
|||
###
|
||||
var conduit1_ps = preload("res://magic/Wands/ChargedWand.tscn")
|
||||
var conduit2_ps = preload("res://magic/Wands/TripleWand.tscn")
|
||||
var conduit3_ps =
|
||||
var conduit4_ps =
|
||||
var conduit3_ps = preload("res://magic/Wands/BouncyWand.tscn")
|
||||
var conduit4_ps = preload("res://magic/Wands/PrismWand.tscn")
|
||||
|
||||
var projectile1_ps = preload("res://magic/projectiles/Projectile1.tscn")
|
||||
var projectile2_ps
|
||||
|
@ -38,6 +38,4 @@ var Magic: Array = [
|
|||
]
|
||||
###
|
||||
|
||||
var WHITE_PROJECTILE_PS = preload("res://magic/projectiles/WhiteProjectile.tscn")
|
||||
var basic_wand_ps = preload("res://magic/Wands/BasicWand.tscn")
|
||||
var player = Vector2()
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
[gd_scene load_steps=7 format=2]
|
||||
[gd_scene load_steps=9 format=2]
|
||||
|
||||
[ext_resource path="res://ui/Inventory.png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/Inventory.gd" type="Script" id=2]
|
||||
[ext_resource path="res://art/Wand.png" type="Texture" id=3]
|
||||
[ext_resource path="res://art/TripleWand.png" type="Texture" id=4]
|
||||
[ext_resource path="res://art/BouncingWand.png" type="Texture" id=5]
|
||||
[ext_resource path="res://art/PrismaticWand.png" type="Texture" id=6]
|
||||
|
||||
[sub_resource type="Animation" id=1]
|
||||
resource_name = "SlideIn"
|
||||
|
@ -52,26 +54,55 @@ texture = ExtResource( 1 )
|
|||
|
||||
[node name="Conduit1" type="TextureButton" parent="Inventory/Conduits"]
|
||||
light_mask = -2147483647
|
||||
margin_left = -74.0
|
||||
margin_top = -18.0
|
||||
margin_right = -70.0
|
||||
margin_bottom = -4.0
|
||||
toggle_mode = true
|
||||
margin_left = -80.0
|
||||
margin_top = -16.0
|
||||
margin_right = -66.0
|
||||
action_mode = 0
|
||||
texture_normal = ExtResource( 3 )
|
||||
expand = true
|
||||
stretch_mode = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Conduit2" type="TextureButton" parent="Inventory/Conduits"]
|
||||
light_mask = -2147483647
|
||||
margin_left = -55.0
|
||||
margin_top = -20.0
|
||||
margin_left = -58.0
|
||||
margin_top = -18.0
|
||||
margin_right = -39.0
|
||||
margin_bottom = 2.0
|
||||
toggle_mode = true
|
||||
margin_bottom = 4.0
|
||||
action_mode = 0
|
||||
texture_normal = ExtResource( 4 )
|
||||
expand = true
|
||||
stretch_mode = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Conduit3" type="TextureButton" parent="Inventory/Conduits"]
|
||||
light_mask = -2147483647
|
||||
margin_left = -81.0
|
||||
margin_top = 5.0
|
||||
margin_right = -64.0
|
||||
margin_bottom = 27.0
|
||||
action_mode = 0
|
||||
texture_normal = ExtResource( 5 )
|
||||
expand = true
|
||||
stretch_mode = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Conduit4" type="TextureButton" parent="Inventory/Conduits"]
|
||||
light_mask = -2147483647
|
||||
margin_left = -58.0
|
||||
margin_top = 7.0
|
||||
margin_right = -40.0
|
||||
margin_bottom = 29.0
|
||||
action_mode = 0
|
||||
texture_normal = ExtResource( 6 )
|
||||
expand = true
|
||||
stretch_mode = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
@ -81,5 +112,7 @@ visible = false
|
|||
|
||||
[node name="Effects" type="Node2D" parent="Inventory"]
|
||||
visible = false
|
||||
[connection signal="toggled" from="Inventory/Conduits/Conduit1" to="." method="_on_Conduit1_toggled"]
|
||||
[connection signal="toggled" from="Inventory/Conduits/Conduit2" to="." method="_on_Conduit1_toggled"]
|
||||
[connection signal="pressed" from="Inventory/Conduits/Conduit1" to="." method="_on_Conduit1_toggled"]
|
||||
[connection signal="pressed" from="Inventory/Conduits/Conduit2" to="." method="_on_Conduit2_toggled"]
|
||||
[connection signal="pressed" from="Inventory/Conduits/Conduit3" to="." method="_on_Conduit3_toggled"]
|
||||
[connection signal="pressed" from="Inventory/Conduits/Conduit4" to="." method="_on_Conduit4_toggled"]
|
||||
|
|
Loading…
Reference in a new issue