Cards
parent
c8802072c9
commit
53fe8247a1
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=27 format=2]
|
||||
[gd_scene load_steps=28 format=2]
|
||||
|
||||
[ext_resource path="res://src/scenes/menu/background/background.png" type="Texture" id=1]
|
||||
[ext_resource path="res://src/scenes/game/sprites/background_houses.png" type="Texture" id=2]
|
||||
|
@ -8,6 +8,7 @@
|
|||
[ext_resource path="res://src/scenes/game/sprites/health/health.png" type="Texture" id=6]
|
||||
[ext_resource path="res://src/scenes/game/sprites/stun/stun_placeholder_spriteframes.tres" type="SpriteFrames" id=7]
|
||||
[ext_resource path="res://src/scenes/game/sprites/stun/stun_spriteframes.tres" type="SpriteFrames" id=8]
|
||||
[ext_resource path="res://src/scenes/game/sprites/cards/Card.tscn" type="PackedScene" id=9]
|
||||
[ext_resource path="res://src/scenes/game/sprites/player_icon.png" type="Texture" id=10]
|
||||
[ext_resource path="res://src/scenes/game/game.gd" type="Script" id=11]
|
||||
[ext_resource path="res://src/scenes/game/sprites/ui_background.png" type="Texture" id=12]
|
||||
|
@ -246,6 +247,22 @@ script = ExtResource( 16 )
|
|||
margin_right = 80.0
|
||||
margin_bottom = 3.0
|
||||
|
||||
[node name="Cards" type="Control" parent="UIWrapper/UI/Center"]
|
||||
visible = false
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
|
||||
[node name="CardLeft" parent="UIWrapper/UI/Center/Cards" instance=ExtResource( 9 )]
|
||||
position = Vector2( 11, 10 )
|
||||
|
||||
[node name="CardCenter" parent="UIWrapper/UI/Center/Cards" instance=ExtResource( 9 )]
|
||||
position = Vector2( 113, 10 )
|
||||
frame = 1
|
||||
|
||||
[node name="CardRight" parent="UIWrapper/UI/Center/Cards" instance=ExtResource( 9 )]
|
||||
position = Vector2( 215, 10 )
|
||||
frame = 2
|
||||
|
||||
[node name="Right" type="Control" parent="UIWrapper/UI"]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
|
|
|
@ -13,7 +13,7 @@ var mob_threshold = [5, 7, 10, 7]
|
|||
|
||||
func _ready():
|
||||
Global.playing = true
|
||||
Global.play_time = 120
|
||||
Global.play_time = 55
|
||||
Global.health = 5
|
||||
Global.add_health(0)
|
||||
|
||||
|
@ -27,8 +27,9 @@ func _physics_process(delta):
|
|||
difficulty = int(Global.play_time / 60)
|
||||
if difficulty != last_diff:
|
||||
last_diff = difficulty
|
||||
# TODO perk selection
|
||||
|
||||
$UIWrapper/UI/Center/Cards.visible = true
|
||||
#TODO Pause
|
||||
|
||||
$UIWrapper/UI/LevelProgressBar/ColorRect.rect_size.x = (Global.play_time - difficulty * 60) / 60.0 * 300
|
||||
|
||||
for i in range(clamp(difficulty + 1, 1, 4)):
|
||||
|
@ -37,3 +38,4 @@ func _physics_process(delta):
|
|||
mob_timers[i] = .0
|
||||
var mob_instance = mob_preloads[i].instance()
|
||||
$View/Enemies.add_child(mob_instance)
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://src/scenes/game/sprites/cards/cards_spriteframes.tres" type="SpriteFrames" id=1]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 47, 51.5 )
|
||||
|
||||
[node name="Card" type="AnimatedSprite"]
|
||||
frames = ExtResource( 1 )
|
||||
animation = "idle"
|
||||
playing = true
|
||||
centered = false
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||
position = Vector2( 47, 51.5 )
|
||||
shape = SubResource( 1 )
|
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/cards.png-de0d7634707005f50aa7f118048a0217.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/scenes/game/sprites/cards/cards.png"
|
||||
dest_files=[ "res://.import/cards.png-de0d7634707005f50aa7f118048a0217.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
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
|
@ -0,0 +1,43 @@
|
|||
[gd_resource type="SpriteFrames" load_steps=10 format=2]
|
||||
|
||||
[ext_resource path="res://src/scenes/game/sprites/cards/cards.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 94, 103 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 94, 0, 94, 103 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 188, 0, 94, 103 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 282, 0, 94, 103 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=5]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 376, 0, 94, 103 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=6]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 470, 0, 94, 103 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=7]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 564, 0, 94, 103 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=8]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 658, 0, 94, 103 )
|
||||
|
||||
[resource]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ) ],
|
||||
"loop": false,
|
||||
"name": "idle",
|
||||
"speed": 0.0
|
||||
} ]
|
Loading…
Reference in New Issue