|
@@ -1,23 +1,42 @@
|
|
|
-[gd_scene load_steps=4 format=2]
|
|
|
+[gd_scene load_steps=11 format=2]
|
|
|
|
|
|
[ext_resource path="res://3d_in_2d.gd" type="Script" id=1]
|
|
|
[ext_resource path="res://robot_demo.png" type="Texture" id=2]
|
|
|
[ext_resource path="res://robot_3d.tscn" type="PackedScene" id=3]
|
|
|
|
|
|
-[node name="3Din2D" type="Node2D"]
|
|
|
-script = ExtResource( 1 )
|
|
|
+[sub_resource type="ViewportTexture" id=1]
|
|
|
+viewport_path = NodePath("Viewport")
|
|
|
|
|
|
-[node name="Sprite2D" type="Sprite" parent="."]
|
|
|
-position = Vector2( 339.942, 311.204 )
|
|
|
-scale = Vector2( 3, 3 )
|
|
|
-texture = ExtResource( 2 )
|
|
|
-vframes = 2
|
|
|
-hframes = 16
|
|
|
-frame = 4
|
|
|
+[sub_resource type="AtlasTexture" id=2]
|
|
|
+atlas = ExtResource( 2 )
|
|
|
+region = Rect2( 0, 0, 64, 64 )
|
|
|
|
|
|
-[node name="ViewportSprite" type="Sprite" parent="."]
|
|
|
-position = Vector2( 600, 320 )
|
|
|
-rotation = 3.14159
|
|
|
+[sub_resource type="AtlasTexture" id=3]
|
|
|
+atlas = ExtResource( 2 )
|
|
|
+region = Rect2( 64, 0, 64, 64 )
|
|
|
+
|
|
|
+[sub_resource type="AtlasTexture" id=4]
|
|
|
+atlas = ExtResource( 2 )
|
|
|
+region = Rect2( 128, 0, 64, 64 )
|
|
|
+
|
|
|
+[sub_resource type="AtlasTexture" id=5]
|
|
|
+atlas = ExtResource( 2 )
|
|
|
+region = Rect2( 192, 0, 64, 64 )
|
|
|
+
|
|
|
+[sub_resource type="AtlasTexture" id=6]
|
|
|
+atlas = ExtResource( 2 )
|
|
|
+region = Rect2( 256, 0, 64, 64 )
|
|
|
+
|
|
|
+[sub_resource type="SpriteFrames" id=7]
|
|
|
+animations = [ {
|
|
|
+"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ],
|
|
|
+"loop": true,
|
|
|
+"name": "default",
|
|
|
+"speed": 5.0
|
|
|
+} ]
|
|
|
+
|
|
|
+[node name="3Din2D" type="Node2D"]
|
|
|
+script = ExtResource( 1 )
|
|
|
|
|
|
[node name="Viewport" type="Viewport" parent="."]
|
|
|
size = Vector2( 300, 300 )
|
|
@@ -29,6 +48,16 @@ usage = 3
|
|
|
|
|
|
[node name="Robot3D" parent="Viewport" instance=ExtResource( 3 )]
|
|
|
|
|
|
+[node name="ViewportSprite" type="Sprite" parent="."]
|
|
|
+position = Vector2( 650, 300 )
|
|
|
+scale = Vector2( 1, -1 )
|
|
|
+texture = SubResource( 1 )
|
|
|
+
|
|
|
+[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
|
|
+position = Vector2( 350, 300 )
|
|
|
+scale = Vector2( 3, 3 )
|
|
|
+frames = SubResource( 7 )
|
|
|
+
|
|
|
[node name="Camera2D" type="Camera2D" parent="."]
|
|
|
offset = Vector2( 512, 300 )
|
|
|
current = true
|