minihud
This commit is contained in:
parent
e4cd54b2a9
commit
44f4fef3cf
3 changed files with 96 additions and 80 deletions
|
@ -9,6 +9,8 @@ var cf1
|
||||||
var cf2
|
var cf2
|
||||||
var cf3
|
var cf3
|
||||||
var cf4
|
var cf4
|
||||||
|
var cff
|
||||||
|
var cnf
|
||||||
var focus1
|
var focus1
|
||||||
var focus2
|
var focus2
|
||||||
var focus3
|
var focus3
|
||||||
|
@ -34,6 +36,8 @@ func _ready():
|
||||||
focus2 = $Topleft/Character2/ColorRect2
|
focus2 = $Topleft/Character2/ColorRect2
|
||||||
focus3 = $Topleft/Character3/ColorRect2
|
focus3 = $Topleft/Character3/ColorRect2
|
||||||
focus4 = $Topleft/Character4/ColorRect2
|
focus4 = $Topleft/Character4/ColorRect2
|
||||||
|
cnf = $Topmini/VBoxContainer/HBoxContainer/Label
|
||||||
|
cff = $Topmini/TextureRect
|
||||||
topleft.visible = false
|
topleft.visible = false
|
||||||
topleftbg.visible = false
|
topleftbg.visible = false
|
||||||
if Global.mangohud:
|
if Global.mangohud:
|
||||||
|
@ -56,6 +60,7 @@ func _input(event):
|
||||||
topleftbg.visible = false
|
topleftbg.visible = false
|
||||||
_charrefresh()
|
_charrefresh()
|
||||||
func _charrefresh():
|
func _charrefresh():
|
||||||
|
if topleft.visible:
|
||||||
if Global.debug:
|
if Global.debug:
|
||||||
if Global.dparty[0] != null:
|
if Global.dparty[0] != null:
|
||||||
cn1.set_text(Global.pcnames[Global.dparty[0]])
|
cn1.set_text(Global.pcnames[Global.dparty[0]])
|
||||||
|
@ -146,3 +151,11 @@ func _charrefresh():
|
||||||
cn4.set_text("")
|
cn4.set_text("")
|
||||||
cf4.texture = null
|
cf4.texture = null
|
||||||
focus4.set_color(Color(1, 1, 1, 1))
|
focus4.set_color(Color(1, 1, 1, 1))
|
||||||
|
else:
|
||||||
|
if Global.debug:
|
||||||
|
cnf.set_text(Global.pcnames[Global.dparty[Global.dcpchar]])
|
||||||
|
cff.texture = load(Global.hudfaces[Global.dparty[Global.dcpchar]])
|
||||||
|
else:
|
||||||
|
cnf.set_text(Global.pcnames[Global.party[Global.cpchar]])
|
||||||
|
cff.texture = load(Global.hudfaces[Global.party[Global.cpchar]])
|
||||||
|
|
||||||
|
|
|
@ -116,14 +116,17 @@ horizontal_alignment = 2
|
||||||
[node name="ColorRect2" type="ColorRect" parent="Topmini"]
|
[node name="ColorRect2" type="ColorRect" parent="Topmini"]
|
||||||
custom_minimum_size = Vector2(12, 64)
|
custom_minimum_size = Vector2(12, 64)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
color = Color(0, 0, 1, 1)
|
||||||
|
|
||||||
[node name="Topleftbg" type="ColorRect" parent="."]
|
[node name="Topleftbg" type="ColorRect" parent="."]
|
||||||
|
visible = false
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_right = 377.0
|
offset_right = 377.0
|
||||||
offset_bottom = 476.0
|
offset_bottom = 476.0
|
||||||
color = Color(0.254902, 0.254902, 0.254902, 1)
|
color = Color(0.254902, 0.254902, 0.254902, 1)
|
||||||
|
|
||||||
[node name="Topleft" type="VBoxContainer" parent="."]
|
[node name="Topleft" type="VBoxContainer" parent="."]
|
||||||
|
visible = false
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_right = 377.0
|
offset_right = 377.0
|
||||||
offset_bottom = 476.0
|
offset_bottom = 476.0
|
||||||
|
|
|
@ -23,7 +23,6 @@ func _physics_process(delta):
|
||||||
#var velocity = Vector2.ZERO
|
#var velocity = Vector2.ZERO
|
||||||
if Global.live == 1:
|
if Global.live == 1:
|
||||||
velocity = (Vector2.RIGHT.rotated(rotation) * 500 * Global.xm * delta)-Vector2.UP.rotated(rotation) * 500 * Global.ym * delta
|
velocity = (Vector2.RIGHT.rotated(rotation) * 500 * Global.xm * delta)-Vector2.UP.rotated(rotation) * 500 * Global.ym * delta
|
||||||
_charswitch()
|
|
||||||
#origmpos = get_viewport().get_mouse_position()
|
#origmpos = get_viewport().get_mouse_position()
|
||||||
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
||||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||||
|
@ -58,6 +57,7 @@ func _physics_process(delta):
|
||||||
|
|
||||||
func _input(event):
|
func _input(event):
|
||||||
if Global.live == 1:
|
if Global.live == 1:
|
||||||
|
_charswitch()
|
||||||
if Input.is_action_just_pressed("shoot") && !bpress && Global.live == 1:
|
if Input.is_action_just_pressed("shoot") && !bpress && Global.live == 1:
|
||||||
bpress = true
|
bpress = true
|
||||||
var bullet
|
var bullet
|
||||||
|
|
Loading…
Reference in a new issue