asteroids cooking
This commit is contained in:
parent
d5c27030c5
commit
51be54d905
8 changed files with 73 additions and 15 deletions
|
|
@ -8,9 +8,16 @@ class_name Channel
|
||||||
@export var offline_channel_cover : TextureRect
|
@export var offline_channel_cover : TextureRect
|
||||||
@export var game_viewport : SubViewport
|
@export var game_viewport : SubViewport
|
||||||
|
|
||||||
var channel_online : bool
|
var channel_online : bool = true
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
var new_scene = channel_scene.instantiate()
|
||||||
|
game_viewport.add_child(new_scene)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
offline_channel_cover.visible = !channel_online
|
||||||
|
|
||||||
func start_channel():
|
func start_channel():
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
[gd_scene load_steps=5 format=3 uid="uid://63rik2noj8id"]
|
[gd_scene load_steps=4 format=3 uid="uid://63rik2noj8id"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://h43mmpjmmir4" path="res://base modules/channel_controller.gd" id="1_r07ln"]
|
[ext_resource type="Script" uid="uid://h43mmpjmmir4" path="res://base modules/channel_controller.gd" id="1_r07ln"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cyo0wl4dt3td1" path="res://sprites/offline_channel.png" id="2_01b3p"]
|
[ext_resource type="Texture2D" uid="uid://cyo0wl4dt3td1" path="res://sprites/offline_channel.png" id="2_01b3p"]
|
||||||
[ext_resource type="PackedScene" uid="uid://ch1x8pfdu2b1g" path="res://test_game.tscn" id="3_27arb"]
|
|
||||||
|
|
||||||
[sub_resource type="ViewportTexture" id="ViewportTexture_iix04"]
|
[sub_resource type="ViewportTexture" id="ViewportTexture_iix04"]
|
||||||
viewport_path = NodePath("GameViewport")
|
viewport_path = NodePath("GameViewport")
|
||||||
|
|
@ -46,5 +45,3 @@ texture = ExtResource("2_01b3p")
|
||||||
handle_input_locally = false
|
handle_input_locally = false
|
||||||
size = Vector2i(640, 360)
|
size = Vector2i(640, 360)
|
||||||
render_target_update_mode = 4
|
render_target_update_mode = 4
|
||||||
|
|
||||||
[node name="Game" parent="GameViewport" instance=ExtResource("3_27arb")]
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
[gd_scene load_steps=3 format=3 uid="uid://ct8axfbvd2wn4"]
|
[gd_scene load_steps=5 format=3 uid="uid://ct8axfbvd2wn4"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://63rik2noj8id" path="res://base modules/test_channel.tscn" id="1_mlf6e"]
|
[ext_resource type="PackedScene" uid="uid://63rik2noj8id" path="res://base modules/test_channel.tscn" id="1_mlf6e"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://ch1x8pfdu2b1g" path="res://test_game.tscn" id="2_mixcd"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cyo0wl4dt3td1" path="res://sprites/offline_channel.png" id="2_po0ka"]
|
[ext_resource type="Texture2D" uid="uid://cyo0wl4dt3td1" path="res://sprites/offline_channel.png" id="2_po0ka"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bw1hhx7lyfonr" path="res://games/asteroids/asteroids.tscn" id="3_mj2jn"]
|
||||||
|
|
||||||
[node name="GameScene" type="Control"]
|
[node name="GameScene" type="Control"]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
|
|
@ -31,7 +33,12 @@ columns = 3
|
||||||
|
|
||||||
[node name="Control" parent="GridContainer" instance=ExtResource("1_mlf6e")]
|
[node name="Control" parent="GridContainer" instance=ExtResource("1_mlf6e")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
channel_name = ""
|
channel_scene = ExtResource("2_mixcd")
|
||||||
|
|
||||||
|
[node name="Control2" parent="GridContainer" instance=ExtResource("1_mlf6e")]
|
||||||
|
layout_mode = 2
|
||||||
|
channel_name = "Asteroids"
|
||||||
|
channel_scene = ExtResource("3_mj2jn")
|
||||||
|
|
||||||
[node name="ColorRect" type="TextureRect" parent="GridContainer"]
|
[node name="ColorRect" type="TextureRect" parent="GridContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
@ -82,12 +89,5 @@ size_flags_vertical = 3
|
||||||
texture = ExtResource("2_po0ka")
|
texture = ExtResource("2_po0ka")
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
|
|
||||||
[node name="ColorRect8" type="TextureRect" parent="GridContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
size_flags_vertical = 3
|
|
||||||
texture = ExtResource("2_po0ka")
|
|
||||||
expand_mode = 1
|
|
||||||
|
|
||||||
[node name="Camera2D" type="Camera2D" parent="."]
|
[node name="Camera2D" type="Camera2D" parent="."]
|
||||||
offset = Vector2(320, 180)
|
offset = Vector2(320, 180)
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,11 @@ rotation_force = 10
|
||||||
drag = 10
|
drag = 10
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="Ship"]
|
[node name="Sprite2D" type="Sprite2D" parent="Ship"]
|
||||||
|
texture_filter = 1
|
||||||
texture = ExtResource("2_j0tb1")
|
texture = ExtResource("2_j0tb1")
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Ship"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Ship"]
|
||||||
shape = SubResource("CircleShape2D_dtqgl")
|
shape = SubResource("CircleShape2D_dtqgl")
|
||||||
|
|
||||||
|
[node name="Shooter" type="Marker2D" parent="Ship"]
|
||||||
|
position = Vector2(30, 0)
|
||||||
|
|
|
||||||
15
games/asteroids/bullet.tscn
Normal file
15
games/asteroids/bullet.tscn
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
[gd_scene load_steps=3 format=3 uid="uid://i4us3nam2kn5"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://b775cji263ifl" path="res://sprites/asteroids_bullet.png" id="1_bvcl6"]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_bvcl6"]
|
||||||
|
radius = 13.0
|
||||||
|
|
||||||
|
[node name="Bullet" type="Area2D"]
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
shape = SubResource("CircleShape2D_bvcl6")
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||||
|
texture_filter = 1
|
||||||
|
texture = ExtResource("1_bvcl6")
|
||||||
|
|
@ -36,5 +36,6 @@ asteroids_right={
|
||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
|
textures/canvas_textures/default_texture_filter=0
|
||||||
renderer/rendering_method="gl_compatibility"
|
renderer/rendering_method="gl_compatibility"
|
||||||
renderer/rendering_method.mobile="gl_compatibility"
|
renderer/rendering_method.mobile="gl_compatibility"
|
||||||
|
|
|
||||||
BIN
sprites/asteroids_bullet.png
Normal file
BIN
sprites/asteroids_bullet.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 474 B |
34
sprites/asteroids_bullet.png.import
Normal file
34
sprites/asteroids_bullet.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://b775cji263ifl"
|
||||||
|
path="res://.godot/imported/asteroids_bullet.png-0722dc1178589c90dd0b87fde332631d.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://sprites/asteroids_bullet.png"
|
||||||
|
dest_files=["res://.godot/imported/asteroids_bullet.png-0722dc1178589c90dd0b87fde332631d.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Loading…
Add table
Add a link
Reference in a new issue