Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
b79884e5d2 | |||
a8409c76ad | |||
3ecd50fc45 | |||
fbe731136f | |||
9734d53d62 | |||
7cbf5c634d | |||
fc84f8889f | |||
86d6563975 | |||
a94ee84718 | |||
a118a259c9 | |||
4318ba1982 | |||
4f58350f83 |
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Godot.NET.Sdk/4.0.0-rc.5">
|
||||
<Project Sdk="Godot.NET.Sdk/4.0.0">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
|
@@ -1,10 +0,0 @@
|
||||
<Project Sdk="Godot.NET.Sdk/4.0.0-rc.1">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
<RootNamespace>RPGTestgd4</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="villager_normal.json" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/banana.png-50380ed0796f86b0b05039176725d8eb.c
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
|
@@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/cupcake.png-e641a112586eeca5f723ee6aa32d7f28.
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
|
@@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/debugitem_one64.png-7941e59d1b01f784439647bcf
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
|
@@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/dummy-player-normal.png-45a5eb1f003876b79db5d
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
|
BIN
assets/textures/enemies/slime_green_atlas.png
Normal file
BIN
assets/textures/enemies/slime_green_atlas.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.3 KiB |
34
assets/textures/enemies/slime_green_atlas.png.import
Normal file
34
assets/textures/enemies/slime_green_atlas.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ca1es3hoj53wg"
|
||||
path="res://.godot/imported/slime_green_atlas.png-e4460cfe974755b8ce33e1b93831e12b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/textures/enemies/slime_green_atlas.png"
|
||||
dest_files=["res://.godot/imported/slime_green_atlas.png-e4460cfe974755b8ce33e1b93831e12b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
@@ -10,9 +10,9 @@ config_version=5
|
||||
|
||||
[application]
|
||||
|
||||
config/name="RPG Test gd4"
|
||||
config/name="RPG Test"
|
||||
run/main_scene="res://scenes/overworld.tscn"
|
||||
config/features=PackedStringArray("4.0", "C#", "Forward Plus")
|
||||
config/features=PackedStringArray("4.0", "Forward Plus")
|
||||
boot_splash/show_image=false
|
||||
config/icon="res://assets/textures/debug/dummy-player-normal.png"
|
||||
|
||||
@@ -145,6 +145,10 @@ locale/translations_pot_files=PackedStringArray()
|
||||
2d_physics/layer_1="World"
|
||||
2d_physics/layer_2="Interactable"
|
||||
|
||||
[physics]
|
||||
|
||||
2d/run_on_separate_thread=true
|
||||
|
||||
[rendering]
|
||||
|
||||
global_illumination/gi/use_half_resolution=true
|
||||
|
@@ -91,6 +91,8 @@ height = 55.9998
|
||||
size = Vector2(54, 71)
|
||||
|
||||
[node name="base_npc" type="CharacterBody2D"]
|
||||
collision_mask = 0
|
||||
collision_priority = 15.0
|
||||
|
||||
[node name="animated_sprite_2d" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_rr6ht")
|
||||
|
File diff suppressed because one or more lines are too long
@@ -85,13 +85,14 @@ animations = [{
|
||||
}]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_38v5o"]
|
||||
radius = 7.99997
|
||||
height = 54.0
|
||||
|
||||
[node name="player" type="CharacterBody2D"]
|
||||
process_mode = 1
|
||||
collision_layer = 5
|
||||
collision_mask = 5
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_qehox")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="rotation_center" type="Marker2D" parent="."]
|
||||
metadata/_edit_lock_ = true
|
||||
@@ -108,12 +109,10 @@ metadata/_edit_lock_ = true
|
||||
[node name="animated_sprite_2d" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_65gi3")
|
||||
animation = &"move_down"
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="main_cam" type="Camera2D" parent="."]
|
||||
process_callback = 0
|
||||
position_smoothing_enabled = true
|
||||
position_smoothing_speed = 3.0
|
||||
drag_horizontal_enabled = true
|
||||
drag_vertical_enabled = true
|
||||
editor_draw_drag_margin = true
|
||||
@@ -129,6 +128,10 @@ metadata/_edit_lock_ = true
|
||||
visible = false
|
||||
|
||||
[node name="collision_shape" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, 37)
|
||||
position = Vector2(0, 35)
|
||||
rotation = 1.5708
|
||||
shape = SubResource("CapsuleShape2D_38v5o")
|
||||
|
||||
[node name="globalposition_timer" type="Timer" parent="."]
|
||||
wait_time = 1.5
|
||||
autostart = true
|
||||
|
@@ -22,6 +22,7 @@ pass
|
||||
|
||||
[node name="static_body_2d" type="StaticBody2D" parent="."]
|
||||
position = Vector2(0, 1)
|
||||
collision_priority = 20.0
|
||||
|
||||
[node name="collision_shape_2d" type="CollisionShape2D" parent="static_body_2d"]
|
||||
position = Vector2(1, -2)
|
||||
|
@@ -6,6 +6,7 @@
|
||||
size = Vector2(64, 14.625)
|
||||
|
||||
[node name="dialogdebug_cupcake" type="StaticBody2D"]
|
||||
collision_priority = 20.0
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
|
61
scenes/tiles/enemies/slime.tscn
Normal file
61
scenes/tiles/enemies/slime.tscn
Normal file
@@ -0,0 +1,61 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://cpu7t7csffoxg"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://ca1es3hoj53wg" path="res://assets/textures/enemies/slime_green_atlas.png" id="1_bw6us"]
|
||||
[ext_resource type="Script" path="res://src/scene-scripts/enemies/slime.cs" id="1_l1742"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_eghup"]
|
||||
atlas = ExtResource("1_bw6us")
|
||||
region = Rect2(0, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8p5ni"]
|
||||
atlas = ExtResource("1_bw6us")
|
||||
region = Rect2(64, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_j8570"]
|
||||
atlas = ExtResource("1_bw6us")
|
||||
region = Rect2(128, 0, 64, 64)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_bwr2v"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_eghup")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8p5ni")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_j8570")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_eghup")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_e6mi3"]
|
||||
radius = 9.0
|
||||
height = 46.0
|
||||
|
||||
[node name="slime" type="CharacterBody2D" groups=["enemies"]]
|
||||
collision_layer = 8
|
||||
collision_mask = 9
|
||||
motion_mode = 1
|
||||
floor_stop_on_slope = false
|
||||
floor_constant_speed = true
|
||||
script = ExtResource("1_l1742")
|
||||
|
||||
[node name="animated_sprite_2d" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(0, 19)
|
||||
sprite_frames = SubResource("SpriteFrames_bwr2v")
|
||||
frame_progress = 0.348187
|
||||
|
||||
[node name="collision_shape_2d" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, 28)
|
||||
rotation = 1.5708
|
||||
shape = SubResource("CapsuleShape2D_e6mi3")
|
||||
|
||||
[node name="visible_notifier_2d" type="VisibleOnScreenNotifier2D" parent="."]
|
||||
rect = Rect2(-25, 0, 50, 40)
|
@@ -7,7 +7,8 @@ radius = 33.1361
|
||||
|
||||
[node name="rigid_body_2d" type="RigidBody2D"]
|
||||
collision_layer = 2
|
||||
collision_mask = 3
|
||||
collision_mask = 11
|
||||
collision_priority = 25.0
|
||||
gravity_scale = 0.0
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
|
@@ -22,6 +22,7 @@ func OnAudioFinished():
|
||||
radius = 30.8058
|
||||
|
||||
[node name="sound_debug_tile" type="StaticBody2D"]
|
||||
collision_priority = 20.0
|
||||
script = SubResource("GDScript_krkfl")
|
||||
soundOn = false
|
||||
|
||||
|
@@ -38,9 +38,6 @@ public partial class console : PopupPanel
|
||||
//Normal keyboard hotkey
|
||||
if (Input.IsActionJustPressed("console"))
|
||||
ToggleVisible();
|
||||
//OS console
|
||||
/*if (OS.ReadStringFromStdIn() != "") //not tested yet
|
||||
OnLineEditTextSubmitted(OS.ReadStringFromStdIn());*/
|
||||
}
|
||||
private void ToggleVisible()
|
||||
{
|
||||
|
17
src/scene-scripts/enemies/slime.cs
Normal file
17
src/scene-scripts/enemies/slime.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class slime : CharacterBody2D
|
||||
{
|
||||
[Export] int speed = 70;
|
||||
Vector2 motion = Vector2.Zero;
|
||||
public override void _Ready() => GetNode<AnimatedSprite2D>("animated_sprite_2d").Play();
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
if (GetNode<VisibleOnScreenNotifier2D>("visible_notifier_2d").IsOnScreen())
|
||||
motion = Position.DirectionTo(player.globalPlayerPosition) * speed;
|
||||
else motion = Vector2.Zero;
|
||||
Velocity = motion;
|
||||
MoveAndSlide();
|
||||
}
|
||||
}
|
@@ -10,6 +10,7 @@ public partial class player : CharacterBody2D
|
||||
public AnimatedSprite2D animatedSprite;
|
||||
public Marker2D rotCenter;
|
||||
public RayCast2D dialogRayCast;
|
||||
public static Vector2 globalPlayerPosition;
|
||||
//console cheats:
|
||||
private static Camera2D cheatCam;
|
||||
private static Camera2D mainCam;
|
||||
@@ -26,6 +27,7 @@ public partial class player : CharacterBody2D
|
||||
}
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
globalPlayerPosition = Position;
|
||||
if (allowMovement)
|
||||
movement = Input.GetVector("move_left", "move_right", "move_up", "move_down");
|
||||
else movement = Vector2.Zero;
|
||||
|
@@ -1,36 +1,30 @@
|
||||
[gd_resource type="TileSet" load_steps=11 format=3 uid="uid://dcg1tdmkkx22p"]
|
||||
[gd_resource type="TileSet" load_steps=10 format=3 uid="uid://dcg1tdmkkx22p"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dk7fqaw2b3w1k" path="res://scenes/tiles/first_debug_tile.tscn" id="1_uxmn6"]
|
||||
[ext_resource type="PackedScene" uid="uid://dckxciecwjfgf" path="res://scenes/tiles/cupcake.tscn" id="2_v4037"]
|
||||
[ext_resource type="PackedScene" uid="uid://c4dkrtswpv8cv" path="res://scenes/tiles/sound_debug_tile.tscn" id="3_lf2fs"]
|
||||
[ext_resource type="Texture2D" uid="uid://d3l4uomk1gw8c" path="res://assets/textures/debug/grass_tile.png" id="4_k7c1q"]
|
||||
[ext_resource type="PackedScene" uid="uid://ct6s1gfjkciva" path="res://scenes/tiles/3d_cube_tile.tscn" id="5_x3uol"]
|
||||
[ext_resource type="PackedScene" uid="uid://cpu7t7csffoxg" path="res://scenes/tiles/enemies/slime.tscn" id="6_mcy76"]
|
||||
|
||||
[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_lcrun"]
|
||||
resource_name = "test"
|
||||
resource_name = "debug"
|
||||
scenes/0/scene = ExtResource("1_uxmn6")
|
||||
|
||||
[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_eskkr"]
|
||||
resource_name = "cupcake"
|
||||
scenes/1/scene = ExtResource("5_x3uol")
|
||||
scenes/2/scene = ExtResource("2_v4037")
|
||||
|
||||
[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_xtxu0"]
|
||||
resource_name = "sounddebug"
|
||||
scenes/1/scene = ExtResource("3_lf2fs")
|
||||
scenes/3/scene = ExtResource("3_lf2fs")
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_na45g"]
|
||||
texture = ExtResource("4_k7c1q")
|
||||
texture_region_size = Vector2i(64, 64)
|
||||
0:0/0 = 0
|
||||
|
||||
[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_loadc"]
|
||||
resource_name = "3d cube"
|
||||
scenes/1/scene = ExtResource("5_x3uol")
|
||||
[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_d4uti"]
|
||||
resource_name = "enemies"
|
||||
scenes/1/scene = ExtResource("6_mcy76")
|
||||
|
||||
[resource]
|
||||
tile_size = Vector2i(64, 64)
|
||||
sources/0 = SubResource("TileSetScenesCollectionSource_lcrun")
|
||||
sources/1 = SubResource("TileSetScenesCollectionSource_eskkr")
|
||||
sources/2 = SubResource("TileSetScenesCollectionSource_xtxu0")
|
||||
sources/3 = SubResource("TileSetAtlasSource_na45g")
|
||||
sources/4 = SubResource("TileSetScenesCollectionSource_loadc")
|
||||
sources/5 = SubResource("TileSetScenesCollectionSource_d4uti")
|
||||
|
Reference in New Issue
Block a user