mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-19 03:33:48 +00:00
Camera 2D
This commit is contained in:
parent
bee29ba9ea
commit
4cb902053d
18 changed files with 791 additions and 24 deletions
32
Scenes/game.tscn
Normal file
32
Scenes/game.tscn
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://cwfaxgr8pgfga"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scenes/game.gd" id="1_s0gpj"]
|
||||
[ext_resource type="Script" path="res://Scenes/PixelPerfectRendering.gd" id="2_gdejn"]
|
||||
[ext_resource type="PackedScene" uid="uid://bv451a8wgty4u" path="res://Scenes/test.tscn" id="3_l2ygy"]
|
||||
[ext_resource type="Script" path="res://Scenes/SubViewportSprite.gd" id="4_adb7a"]
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_m5h5j"]
|
||||
viewport_path = NodePath("PixelPerfectRendering/SubViewport")
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
script = ExtResource("1_s0gpj")
|
||||
|
||||
[node name="PixelPerfectRendering" type="Node2D" parent="."]
|
||||
editor_description = "The children of this node are responsible for handling pixel-perfect rendering in the game world."
|
||||
script = ExtResource("2_gdejn")
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="PixelPerfectRendering"]
|
||||
handle_input_locally = false
|
||||
snap_2d_vertices_to_pixel = true
|
||||
canvas_item_default_texture_filter = 0
|
||||
size = Vector2i(322, 182)
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="GameScene" parent="PixelPerfectRendering/SubViewport" instance=ExtResource("3_l2ygy")]
|
||||
|
||||
[node name="SubViewportSprite" type="Sprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(960, 540)
|
||||
scale = Vector2(6, 6)
|
||||
texture = SubResource("ViewportTexture_m5h5j")
|
||||
script = ExtResource("4_adb7a")
|
||||
Loading…
Add table
Add a link
Reference in a new issue