mirror of
https://github.com/HarmonyHoney/tiny_crate.git
synced 2026-08-02 04:23:49 +00:00
render viewport to CRT model!
This commit is contained in:
parent
295a06462f
commit
88449b0627
9 changed files with 110 additions and 44 deletions
BIN
DefaultMaterial.material
Normal file
BIN
DefaultMaterial.material
Normal file
Binary file not shown.
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
[ext_resource path="res://Scene/Box.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Scene/Player.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://Script/GameCamera.gd" type="Script" id=3]
|
||||
[ext_resource path="res://Scene/GameCamera.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://Scene/SolidTileMap.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://Image/crate_tiles.png" type="Texture" id=5]
|
||||
[ext_resource path="res://Scene/DetailTileMap.tscn" type="PackedScene" id=6]
|
||||
|
|
@ -72,29 +72,18 @@ tile_data = PoolIntArray( -262153, 2, 0, -262152, 0, 0, -262151, -1610612734, 0,
|
|||
[node name="SpikeTileMap" parent="." instance=ExtResource( 7 )]
|
||||
tile_data = PoolIntArray( 65533, 0, 0, 65534, 0, 0, 65535, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0 )
|
||||
|
||||
[node name="GameCamera" type="Camera2D" parent="."]
|
||||
position = Vector2( 0, -27 )
|
||||
current = true
|
||||
drag_margin_h_enabled = true
|
||||
drag_margin_v_enabled = true
|
||||
smoothing_enabled = true
|
||||
drag_margin_left = 0.1
|
||||
drag_margin_top = 0.1
|
||||
drag_margin_right = 0.1
|
||||
drag_margin_bottom = 0.1
|
||||
editor_draw_limits = true
|
||||
editor_draw_drag_margin = true
|
||||
script = ExtResource( 3 )
|
||||
is_focal_point = true
|
||||
[node name="GameCamera" parent="." instance=ExtResource( 3 )]
|
||||
|
||||
[node name="Exit" parent="." instance=ExtResource( 8 )]
|
||||
[node name="Actors" type="Node2D" parent="."]
|
||||
|
||||
[node name="Exit" parent="Actors" instance=ExtResource( 8 )]
|
||||
position = Vector2( 49, -23 )
|
||||
|
||||
[node name="Player" parent="." groups=[
|
||||
[node name="Player" parent="Actors" groups=[
|
||||
"player",
|
||||
] instance=ExtResource( 2 )]
|
||||
position = Vector2( -45, -8 )
|
||||
|
||||
[node name="Box" parent="." instance=ExtResource( 1 )]
|
||||
[node name="Box" parent="Actors" instance=ExtResource( 1 )]
|
||||
position = Vector2( -76, -8 )
|
||||
gravity = 0.0
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=11 format=2]
|
||||
[gd_scene load_steps=12 format=2]
|
||||
|
||||
[ext_resource path="res://Scene/Box.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Scene/Player.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://Scene/GameCamera.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://Scene/SolidTileMap.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://Image/crate_tiles.png" type="Texture" id=5]
|
||||
[ext_resource path="res://Scene/DetailTileMap.tscn" type="PackedScene" id=6]
|
||||
|
|
@ -71,34 +72,26 @@ tile_data = PoolIntArray( -196610, 0, 0, -196609, 0, 0, -262144, 0, 0, -262143,
|
|||
[node name="DetailTileMap" parent="." instance=ExtResource( 6 )]
|
||||
tile_data = PoolIntArray( -393223, 1610612738, 0, -393222, 1610612738, 0, -393221, 1610612738, 0, -393218, 1610612738, 0, -393217, 1610612738, 0, -458750, 1, 0, -393216, 3, 0, -393214, 0, 0, -327676, 3, 0, -196604, 0, 0, -196603, 0, 0, -196602, 0, 0, -65539, 1, 0, -65537, 3, 0, -131068, 0, 0, -131067, 0, 0, -131066, 0, 0, -3, 0, 0, -65532, 0, 0, -65531, 0, 0, -65530, 0, 0, 65531, 3, 0, 2, 3, 0, 5, 1, 0, 196601, 0, 0, 196602, 0, 0, 196603, 0, 0, 262137, 0, 0, 262138, 0, 0, 262139, 0, 0, 196608, 1610612738, 0, 196609, 1610612738, 0, 196612, 1610612738, 0, 196613, 1610612738, 0, 196614, 1610612738, 0, 327674, 1, 0, 327678, 3, 0, 393209, 2, 0, 393210, 1, 0, 327683, 3, 0 )
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
position = Vector2( -32, -40 )
|
||||
current = true
|
||||
limit_left = -64
|
||||
limit_top = -64
|
||||
limit_right = 64
|
||||
limit_bottom = 64
|
||||
drag_margin_h_enabled = true
|
||||
drag_margin_v_enabled = true
|
||||
smoothing_enabled = true
|
||||
editor_draw_limits = true
|
||||
[node name="GameCamera" parent="." instance=ExtResource( 3 )]
|
||||
|
||||
[node name="Player" parent="." groups=[
|
||||
[node name="Actors" type="Node2D" parent="."]
|
||||
|
||||
[node name="Exit" parent="Actors" instance=ExtResource( 8 )]
|
||||
position = Vector2( 41, 33 )
|
||||
|
||||
[node name="Player" parent="Actors" groups=[
|
||||
"player",
|
||||
] instance=ExtResource( 2 )]
|
||||
position = Vector2( -32, -40 )
|
||||
|
||||
[node name="Box" parent="." instance=ExtResource( 1 )]
|
||||
[node name="Box" parent="Actors" instance=ExtResource( 1 )]
|
||||
position = Vector2( -56, -40 )
|
||||
|
||||
[node name="Box2" parent="." instance=ExtResource( 1 )]
|
||||
[node name="Box2" parent="Actors" instance=ExtResource( 1 )]
|
||||
position = Vector2( -48, -40 )
|
||||
|
||||
[node name="Box3" parent="." instance=ExtResource( 1 )]
|
||||
[node name="Box3" parent="Actors" instance=ExtResource( 1 )]
|
||||
position = Vector2( -56, -48 )
|
||||
|
||||
[node name="Box4" parent="." instance=ExtResource( 1 )]
|
||||
[node name="Box4" parent="Actors" instance=ExtResource( 1 )]
|
||||
position = Vector2( -48, -48 )
|
||||
|
||||
[node name="Exit" parent="." instance=ExtResource( 8 )]
|
||||
position = Vector2( 41, 33 )
|
||||
|
|
|
|||
18
Scene/GameCamera.tscn
Normal file
18
Scene/GameCamera.tscn
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://Script/GameCamera.gd" type="Script" id=1]
|
||||
|
||||
[node name="GameCamera" type="Camera2D"]
|
||||
position = Vector2( 0, -27 )
|
||||
current = true
|
||||
drag_margin_h_enabled = true
|
||||
drag_margin_v_enabled = true
|
||||
smoothing_enabled = true
|
||||
drag_margin_left = 0.1
|
||||
drag_margin_top = 0.1
|
||||
drag_margin_right = 0.1
|
||||
drag_margin_bottom = 0.1
|
||||
editor_draw_limits = true
|
||||
editor_draw_drag_margin = true
|
||||
script = ExtResource( 1 )
|
||||
is_focal_point = true
|
||||
62
Scene/MonitorScene.tscn
Normal file
62
Scene/MonitorScene.tscn
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -24,3 +24,5 @@ func _process(delta):
|
|||
pass
|
||||
else:
|
||||
position = node_target.position + pos_offset
|
||||
position.x = round(position.x)
|
||||
position.y = round(position.y)
|
||||
|
|
|
|||
|
|
@ -52,9 +52,10 @@ func _ready():
|
|||
node_audio_throw = get_node("AudioThrow")
|
||||
|
||||
# assign camera target
|
||||
node_camera_game = Shared.node_camera_game
|
||||
node_camera_game.node_target = self
|
||||
node_camera_game.pos_offset = Vector2(4, 4)
|
||||
if Shared.node_camera_game:
|
||||
node_camera_game = Shared.node_camera_game
|
||||
node_camera_game.node_target = self
|
||||
node_camera_game.pos_offset = Vector2(4, 4)
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
|
|
|
|||
BIN
crt.fbx
Normal file
BIN
crt.fbx
Normal file
Binary file not shown.
|
|
@ -45,7 +45,7 @@ _global_script_class_icons={
|
|||
[application]
|
||||
|
||||
config/name="gdBox"
|
||||
run/main_scene="res://Map/map0.tscn"
|
||||
run/main_scene="res://Scene/MonitorScene.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[autoload]
|
||||
|
|
@ -57,8 +57,9 @@ Shared="*res://Script/Shared.gd"
|
|||
|
||||
window/size/width=128
|
||||
window/size/height=128
|
||||
window/size/test_width=1280
|
||||
window/size/test_height=1280
|
||||
window/size/always_on_top=true
|
||||
window/size/test_width=1080
|
||||
window/size/test_height=1080
|
||||
window/dpi/allow_hidpi=true
|
||||
window/stretch/mode="2d"
|
||||
window/stretch/aspect="keep"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue