camera channels zoom out effect looks very feasible
This commit is contained in:
parent
bf835edaeb
commit
caa2cd4c11
10 changed files with 163 additions and 55 deletions
24
base modules/channel_controller.gd
Normal file
24
base modules/channel_controller.gd
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
extends Control
|
||||
class_name Channel
|
||||
|
||||
|
||||
@export var channel_name : String
|
||||
@export_group("Node References")
|
||||
@export var offline_channel_cover : TextureRect
|
||||
@export var game_viewport : SubViewport
|
||||
|
||||
var channel_online : bool
|
||||
|
||||
|
||||
|
||||
func start_channel():
|
||||
pass
|
||||
|
||||
func end_channel():
|
||||
pass
|
||||
|
||||
func win_channel():
|
||||
pass
|
||||
|
||||
func lose_channel():
|
||||
pass
|
||||
1
base modules/channel_controller.gd.uid
Normal file
1
base modules/channel_controller.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://h43mmpjmmir4
|
||||
6
base modules/move_test.gd
Normal file
6
base modules/move_test.gd
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
extends Node2D
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
var direction := Input.get_axis("ui_left", "ui_right")
|
||||
if direction:
|
||||
position.x += direction * 10
|
||||
1
base modules/move_test.gd.uid
Normal file
1
base modules/move_test.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dlqr0ghj0sh6a
|
||||
63
base modules/test_channel.tscn
Normal file
63
base modules/test_channel.tscn
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://63rik2noj8id"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://diilj7xuttpqu" path="res://icon.svg" id="1_iix04"]
|
||||
[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="Script" uid="uid://dlqr0ghj0sh6a" path="res://base modules/move_test.gd" id="2_jbg2j"]
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_iix04"]
|
||||
viewport_path = NodePath("GameViewport")
|
||||
|
||||
[node name="Control" type="Control" node_paths=PackedStringArray("offline_channel_cover", "game_viewport")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
script = ExtResource("1_r07ln")
|
||||
channel_name = "Test"
|
||||
offline_channel_cover = NodePath("OfflineChannelCover")
|
||||
game_viewport = NodePath("GameViewport")
|
||||
|
||||
[node name="GameDisplay" type="TextureRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = SubResource("ViewportTexture_iix04")
|
||||
expand_mode = 1
|
||||
stretch_mode = 6
|
||||
|
||||
[node name="OfflineChannelCover" type="TextureRect" parent="."]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("2_01b3p")
|
||||
|
||||
[node name="GameViewport" type="SubViewport" parent="."]
|
||||
handle_input_locally = false
|
||||
size = Vector2i(640, 360)
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="ColorRect" type="TextureRect" parent="GameViewport"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("1_iix04")
|
||||
|
||||
[node name="Node2D" type="Node2D" parent="GameViewport"]
|
||||
script = ExtResource("2_jbg2j")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="GameViewport/Node2D"]
|
||||
texture = ExtResource("1_iix04")
|
||||
Loading…
Add table
Add a link
Reference in a new issue