forked from team-sg/hero-mark-2
new health bars wow
This commit is contained in:
parent
9e8abe19ef
commit
828a4ccecc
28 changed files with 466 additions and 70 deletions
|
@ -1,9 +1,9 @@
|
|||
extends "res://maps/map.gd"
|
||||
|
||||
|
||||
onready var sg_health: HSlider = $"%SGHealth"
|
||||
onready var sg_energy: HSlider = $"%SGEnergy"
|
||||
onready var fami_health: HSlider = $"%FamiHealth"
|
||||
onready var sg_health: TextureProgress = $"%SGHealthBar"
|
||||
onready var sg_energy: TextureProgress = $"%SGEnergyBar"
|
||||
onready var fami_health: TextureProgress = $"%FamiHealthBar"
|
||||
onready var sg2083: KinematicBody2D = $"2083"
|
||||
onready var famira: Node2D = $Famira
|
||||
|
||||
|
@ -13,13 +13,15 @@ func _ready() -> void:
|
|||
sg2083.state = sg2083.State.INACTIVE
|
||||
famira.animation_player.play("grow", -1.0, 0.0)
|
||||
|
||||
func _process(delta):
|
||||
sg_energy.value -= 1
|
||||
|
||||
func _on_2083_health_changed(amount) -> void:
|
||||
sg_health.value = amount
|
||||
|
||||
|
||||
func _on_Famira_health_changed(amount) -> void:
|
||||
fami_health.value = -amount
|
||||
fami_health.value = amount
|
||||
|
||||
|
||||
func _on_cutscene_finished() -> void:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=12 format=2]
|
||||
[gd_scene load_steps=20 format=2]
|
||||
|
||||
[ext_resource path="res://objects/enemy/boss/sg2083.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://tilesets/t_laboratory.tres" type="TileSet" id=2]
|
||||
|
@ -9,6 +9,14 @@
|
|||
[ext_resource path="res://cutscenes/fami_cutscene.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://objects/lore/boss/fami.tscn" type="PackedScene" id=8]
|
||||
[ext_resource path="res://graphics/backgrounds/fami_rooftop.png" type="Texture" id=9]
|
||||
[ext_resource path="res://graphics/hud/laser_ok.png" type="Texture" id=10]
|
||||
[ext_resource path="res://ui/2ndpuberty_outline.tres" type="Material" id=11]
|
||||
[ext_resource path="res://graphics/hud/2083_energy_back.png" type="Texture" id=12]
|
||||
[ext_resource path="res://graphics/hud/famira_health_filled.png" type="Texture" id=13]
|
||||
[ext_resource path="res://graphics/hud/famira_health_back.png" type="Texture" id=14]
|
||||
[ext_resource path="res://graphics/hud/2083_energy_filled.png" type="Texture" id=15]
|
||||
[ext_resource path="res://graphics/hud/2083_health_filled.png" type="Texture" id=16]
|
||||
[ext_resource path="res://graphics/hud/2083_health_back.png" type="Texture" id=17]
|
||||
|
||||
[sub_resource type="Animation" id=1]
|
||||
length = 0.001
|
||||
|
@ -177,85 +185,87 @@ centered = false
|
|||
offset = Vector2( -128, 0 )
|
||||
|
||||
[node name="GUI" type="CanvasLayer" parent="."]
|
||||
visible = false
|
||||
|
||||
[node name="Control" type="HBoxContainer" parent="GUI"]
|
||||
[node name="Control" type="Control" parent="GUI"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
theme = ExtResource( 5 )
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="GUI/Control"]
|
||||
margin_right = 126.0
|
||||
margin_bottom = 192.0
|
||||
size_flags_horizontal = 3
|
||||
alignment = 2
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="GUI/Control/VBoxContainer"]
|
||||
margin_top = 168.0
|
||||
margin_right = 126.0
|
||||
[node name="Energy" type="Control" parent="GUI/Control"]
|
||||
margin_left = 8.0
|
||||
margin_top = 167.0
|
||||
margin_right = 161.0
|
||||
margin_bottom = 178.0
|
||||
|
||||
[node name="Label" type="Label" parent="GUI/Control/VBoxContainer/HBoxContainer2"]
|
||||
margin_right = 49.0
|
||||
margin_bottom = 10.0
|
||||
[node name="SGEnergyBar" type="TextureProgress" parent="GUI/Control/Energy"]
|
||||
unique_name_in_owner = true
|
||||
margin_right = 153.0
|
||||
margin_bottom = 11.0
|
||||
size_flags_horizontal = 3
|
||||
value = 100.0
|
||||
texture_under = ExtResource( 12 )
|
||||
texture_progress = ExtResource( 15 )
|
||||
|
||||
[node name="Label" type="Label" parent="GUI/Control/Energy"]
|
||||
material = ExtResource( 11 )
|
||||
margin_left = -7.0
|
||||
margin_top = 11.0
|
||||
margin_right = 146.0
|
||||
margin_bottom = 21.0
|
||||
text = " Energy"
|
||||
|
||||
[node name="SGEnergy" type="HSlider" parent="GUI/Control/VBoxContainer/HBoxContainer2"]
|
||||
[node name="LaserBack" type="TextureRect" parent="GUI/Control/Energy"]
|
||||
margin_left = 60.0
|
||||
margin_top = 11.0
|
||||
margin_right = 100.0
|
||||
margin_bottom = 22.0
|
||||
texture = ExtResource( 10 )
|
||||
|
||||
[node name="FamiHealth" type="Control" parent="GUI/Control/Energy"]
|
||||
margin_left = 140.0
|
||||
margin_top = -163.0
|
||||
margin_right = 286.0
|
||||
margin_bottom = -152.0
|
||||
|
||||
[node name="FamiHealthBar" type="TextureProgress" parent="GUI/Control/Energy/FamiHealth"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 53.0
|
||||
margin_right = 126.0
|
||||
margin_bottom = 10.0
|
||||
margin_right = 146.0
|
||||
margin_bottom = 11.0
|
||||
size_flags_horizontal = 3
|
||||
value = 100.0
|
||||
scrollable = false
|
||||
texture_under = ExtResource( 14 )
|
||||
texture_progress = ExtResource( 13 )
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="GUI/Control/VBoxContainer"]
|
||||
margin_top = 182.0
|
||||
margin_right = 126.0
|
||||
margin_bottom = 192.0
|
||||
|
||||
[node name="Label" type="Label" parent="GUI/Control/VBoxContainer/HBoxContainer"]
|
||||
margin_right = 49.0
|
||||
margin_bottom = 10.0
|
||||
text = "SG 2083"
|
||||
|
||||
[node name="SGHealth" type="HSlider" parent="GUI/Control/VBoxContainer/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 53.0
|
||||
margin_right = 126.0
|
||||
margin_bottom = 10.0
|
||||
size_flags_horizontal = 3
|
||||
value = 100.0
|
||||
scrollable = false
|
||||
|
||||
[node name="VBoxContainer2" type="VBoxContainer" parent="GUI/Control"]
|
||||
margin_left = 130.0
|
||||
margin_right = 256.0
|
||||
margin_bottom = 192.0
|
||||
size_flags_horizontal = 3
|
||||
alignment = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="GUI/Control/VBoxContainer2"]
|
||||
margin_top = 182.0
|
||||
margin_right = 126.0
|
||||
margin_bottom = 192.0
|
||||
|
||||
[node name="FamiHealth" type="HSlider" parent="GUI/Control/VBoxContainer2/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_right = 80.0
|
||||
margin_bottom = 10.0
|
||||
size_flags_horizontal = 3
|
||||
min_value = -100.0
|
||||
max_value = 0.0
|
||||
value = -100.0
|
||||
scrollable = false
|
||||
|
||||
[node name="Label" type="Label" parent="GUI/Control/VBoxContainer2/HBoxContainer"]
|
||||
margin_left = 84.0
|
||||
margin_right = 126.0
|
||||
margin_bottom = 10.0
|
||||
[node name="Label" type="Label" parent="GUI/Control/Energy/FamiHealth"]
|
||||
material = ExtResource( 11 )
|
||||
margin_left = 58.0
|
||||
margin_top = 11.0
|
||||
margin_right = 204.0
|
||||
margin_bottom = 21.0
|
||||
text = "Famira"
|
||||
|
||||
[node name="SGHealth" type="Control" parent="GUI/Control"]
|
||||
margin_left = 8.0
|
||||
margin_top = 4.0
|
||||
margin_right = 407.0
|
||||
margin_bottom = 192.0
|
||||
|
||||
[node name="SGHealthBar" type="TextureProgress" parent="GUI/Control/SGHealth"]
|
||||
unique_name_in_owner = true
|
||||
margin_right = 399.0
|
||||
margin_bottom = 11.0
|
||||
size_flags_horizontal = 3
|
||||
value = 100.0
|
||||
texture_under = ExtResource( 17 )
|
||||
texture_progress = ExtResource( 16 )
|
||||
|
||||
[node name="Label" type="Label" parent="GUI/Control/SGHealth"]
|
||||
material = ExtResource( 11 )
|
||||
margin_top = 11.0
|
||||
margin_right = 399.0
|
||||
margin_bottom = 21.0
|
||||
text = "SG 2083"
|
||||
|
||||
[node name="TileMap2" type="TileMap" parent="."]
|
||||
tile_set = ExtResource( 6 )
|
||||
cell_size = Vector2( 8, 8 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue