bosshealth
This commit is contained in:
parent
62dcb19f4c
commit
f17a8bee92
2 changed files with 44 additions and 5 deletions
|
@ -49,7 +49,7 @@ func _process(delta):
|
||||||
Global.xm = 0
|
Global.xm = 0
|
||||||
Global.ym = 0
|
Global.ym = 0
|
||||||
var velocity = Vector2.ZERO
|
var velocity = Vector2.ZERO
|
||||||
if Global.live == 1 && !Input.is_key_pressed(KEY_V) && !Input.is_joy_button_pressed(0,JOY_BUTTON_RIGHT_SHOULDER):
|
if Global.live == 1 && !Input.is_action_pressed("schar"):
|
||||||
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
|
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
|
||||||
Global.xm = Input.get_joy_axis(0,JOY_AXIS_LEFT_X)
|
Global.xm = Input.get_joy_axis(0,JOY_AXIS_LEFT_X)
|
||||||
Global.ym = Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
Global.ym = Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||||
|
@ -76,28 +76,28 @@ func _input(event):
|
||||||
get_tree().change_scene_to_file("res://levels/ui/scene.tscn")
|
get_tree().change_scene_to_file("res://levels/ui/scene.tscn")
|
||||||
else:
|
else:
|
||||||
get_tree().change_scene_to_file("res://title.tscn")
|
get_tree().change_scene_to_file("res://title.tscn")
|
||||||
if (Global.live == 1 && (Input.is_key_pressed(KEY_V) && Input.is_key_pressed(KEY_UP)) ||(Input.is_joy_button_pressed(0,JOY_BUTTON_RIGHT_SHOULDER) && Input.is_joy_button_pressed(0,JOY_BUTTON_DPAD_UP))):
|
if Global.live == 1 && Input.is_action_pressed("schar") && Input.is_action_just_pressed("ui_up"):
|
||||||
if Global.debug:
|
if Global.debug:
|
||||||
if Global.dparty[0][0] != null:
|
if Global.dparty[0][0] != null:
|
||||||
Global.dcpchar = 0
|
Global.dcpchar = 0
|
||||||
else:
|
else:
|
||||||
if Global.party[0][0] != null:
|
if Global.party[0][0] != null:
|
||||||
Global.cpchar = 0
|
Global.cpchar = 0
|
||||||
elif (Global.live == 1 && (Input.is_key_pressed(KEY_V) && Input.is_key_pressed(KEY_RIGHT)) ||(Input.is_joy_button_pressed(0,JOY_BUTTON_RIGHT_SHOULDER) && Input.is_joy_button_pressed(0,JOY_BUTTON_DPAD_RIGHT))):
|
elif Global.live == 1 && Input.is_action_pressed("schar") && Input.is_action_just_pressed("ui_right"):
|
||||||
if Global.debug:
|
if Global.debug:
|
||||||
if Global.dparty[1][0] != null:
|
if Global.dparty[1][0] != null:
|
||||||
Global.dcpchar = 1
|
Global.dcpchar = 1
|
||||||
else:
|
else:
|
||||||
if Global.party[1][0] != null:
|
if Global.party[1][0] != null:
|
||||||
Global.cpchar = 1
|
Global.cpchar = 1
|
||||||
elif (Global.live == 1 && (Input.is_key_pressed(KEY_V) && Input.is_key_pressed(KEY_DOWN)) ||(Input.is_joy_button_pressed(0,JOY_BUTTON_RIGHT_SHOULDER) && Input.is_joy_button_pressed(0,JOY_BUTTON_DPAD_DOWN))):
|
elif Global.live == 1 && Input.is_action_pressed("schar") && Input.is_action_just_pressed("ui_down"):
|
||||||
if Global.debug:
|
if Global.debug:
|
||||||
if Global.dparty[2][0] != null:
|
if Global.dparty[2][0] != null:
|
||||||
Global.dcpchar = 2
|
Global.dcpchar = 2
|
||||||
else:
|
else:
|
||||||
if Global.party[2][0] != null:
|
if Global.party[2][0] != null:
|
||||||
Global.cpchar = 2
|
Global.cpchar = 2
|
||||||
elif (Global.live == 1 && (Input.is_key_pressed(KEY_V) && Input.is_key_pressed(KEY_LEFT)) ||(Input.is_joy_button_pressed(0,JOY_BUTTON_RIGHT_SHOULDER) && Input.is_joy_button_pressed(0,JOY_BUTTON_DPAD_LEFT))):
|
elif Global.live == 1 && Input.is_action_pressed("schar") && Input.is_action_just_pressed("ui_left"):
|
||||||
if Global.debug:
|
if Global.debug:
|
||||||
if Global.dparty[3][0] != null:
|
if Global.dparty[3][0] != null:
|
||||||
Global.dcpchar = 3
|
Global.dcpchar = 3
|
||||||
|
|
|
@ -25,6 +25,45 @@ script = ExtResource("1_pntuv")
|
||||||
|
|
||||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||||
|
|
||||||
|
[node name="Bossbg" type="ColorRect" parent="CanvasLayer"]
|
||||||
|
offset_left = 467.0
|
||||||
|
offset_right = 708.0
|
||||||
|
offset_bottom = 50.0
|
||||||
|
color = Color(0.254902, 0.254902, 0.254902, 1)
|
||||||
|
|
||||||
|
[node name="Boss" type="VBoxContainer" parent="CanvasLayer"]
|
||||||
|
offset_left = 467.0
|
||||||
|
offset_right = 708.0
|
||||||
|
offset_bottom = 50.0
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/Boss"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="CanvasLayer/Boss/HBoxContainer"]
|
||||||
|
custom_minimum_size = Vector2(174, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Name"
|
||||||
|
|
||||||
|
[node name="HBoxContainer2" type="HBoxContainer" parent="CanvasLayer/Boss"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="CanvasLayer/Boss/HBoxContainer2"]
|
||||||
|
custom_minimum_size = Vector2(70, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Health"
|
||||||
|
|
||||||
|
[node name="ProgressBar" type="ProgressBar" parent="CanvasLayer/Boss/HBoxContainer2"]
|
||||||
|
custom_minimum_size = Vector2(100, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_styles/background = SubResource("StyleBoxFlat_ualpu")
|
||||||
|
theme_override_styles/fill = SubResource("StyleBoxFlat_patnr")
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="CanvasLayer/Boss/HBoxContainer2"]
|
||||||
|
custom_minimum_size = Vector2(63, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
text = "100/100"
|
||||||
|
horizontal_alignment = 2
|
||||||
|
|
||||||
[node name="Topminibg" type="ColorRect" parent="CanvasLayer"]
|
[node name="Topminibg" type="ColorRect" parent="CanvasLayer"]
|
||||||
offset_right = 377.0
|
offset_right = 377.0
|
||||||
offset_bottom = 116.0
|
offset_bottom = 116.0
|
||||||
|
|
Loading…
Reference in a new issue