added testing npc sprite

added static npc scene
added static npc into world
master
Zac 5 years ago
parent 84780473d9
commit 6e87ca3b09

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

@ -0,0 +1,29 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/troll.png-0a30c7e800ebe25e80a239ff95c35c74.stex"
[deps]
source_file="res://images/troll.png"
dest_files=[ "res://.import/troll.png-0a30c7e800ebe25e80a239ff95c35c74.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

@ -0,0 +1,54 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://images/troll.png" type="Texture" id=1]
[sub_resource type="RectangleShape2D" id=1]
custom_solver_bias = 0.0
extents = Vector2( 29.9994, 40.5807 )
[sub_resource type="RectangleShape2D" id=2]
custom_solver_bias = 0.0
extents = Vector2( 60.0752, 66.6499 )
[node name="NPC" type="StaticBody2D" index="0"]
input_pickable = false
collision_layer = 4
collision_mask = 11
constant_linear_velocity = Vector2( 0, 0 )
constant_angular_velocity = 0.0
friction = 1.0
bounce = 0.0
[node name="npc_collision" type="CollisionShape2D" parent="." index="0"]
scale = Vector2( 0.4, 0.4 )
shape = SubResource( 1 )
[node name="interact_area" type="Area2D" parent="." index="1"]
editor/display_folded = true
scale = Vector2( 0.4, 0.4 )
input_pickable = true
gravity_vec = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
collision_layer = 4
audio_bus_override = false
audio_bus_name = "Master"
_sections_unfolded = [ "Collision" ]
[node name="interact_collision" type="CollisionShape2D" parent="interact_area" index="0"]
shape = SubResource( 2 )
[node name="Sprite" type="Sprite" parent="." index="2"]
scale = Vector2( 0.4, 0.4 )
texture = ExtResource( 1 )
hframes = 3

@ -45,13 +45,13 @@ smoothing_enabled = true
smoothing_speed = 5.0
offset_v = 0.0
offset_h = 0.0
drag_margin_left = 0.2
drag_margin_top = 0.2
drag_margin_right = 0.2
drag_margin_bottom = 0.2
drag_margin_left = 0.15
drag_margin_top = 0.15
drag_margin_right = 0.15
drag_margin_bottom = 0.15
editor_draw_screen = true
editor_draw_limits = true
editor_draw_drag_margin = true
_sections_unfolded = [ "Editor", "Smoothing" ]
_sections_unfolded = [ "Drag Margin" ]

@ -1,7 +1,8 @@
[gd_scene load_steps=3 format=2]
[gd_scene load_steps=4 format=2]
[ext_resource path="res://resources/tiles.res" type="TileSet" id=1]
[ext_resource path="res://scenes/Player.tscn" type="PackedScene" id=2]
[ext_resource path="res://scenes/NPC_static.tscn" type="PackedScene" id=2]
[ext_resource path="res://scenes/Player.tscn" type="PackedScene" id=3]
[node name="World" type="Node2D" index="0"]
@ -50,7 +51,13 @@ format = 1
tile_data = PoolIntArray( -131073, 1, 0, -196608, 1, 0, -196607, 1, 0, -196606, 1, 0, -196605, 1, 0, -196604, 1, 0, -196603, 1, 0, -196602, 1, 0, -196601, 1, 0, -196600, 1, 0, -65537, 1, 0, -131072, 1, 0, -131064, 1, 0, -3, 1, 0, -2, 1, 0, -1, 1, 0, -65536, 1, 0, -65528, 1, 0, 65533, 1, 0, 65534, 1, 0, 65535, 1, 0, 0, 1, 0, 8, 1, 0, 131069, 1, 0, 65544, 1, 0, 196604, 0, 0, 196605, 0, 0, 196606, 0, 0, 196607, 0, 0, 131072, 0, 0, 131073, 0, 0, 131079, 0, 0, 131080, 0, 0, 131081, 0, 0 )
_sections_unfolded = [ "Collision" ]
[node name="Player" parent="." index="1" instance=ExtResource( 2 )]
[node name="NPCs" type="Node2D" parent="." index="1"]
[node name="NPC" parent="NPCs" index="0" instance=ExtResource( 2 )]
position = Vector2( 544.265, 95.9369 )
[node name="Player" parent="." index="2" instance=ExtResource( 3 )]
Speed = 20

Loading…
Cancel
Save