mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2025-12-16 13:30:07 +01:00
Add Squash the Creeps 3D C# demo for Godot mono (#1001)
This commit is contained in:
50
mono/squash_the_creeps/Main.cs
Normal file
50
mono/squash_the_creeps/Main.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using Godot;
|
||||
|
||||
public partial class Main : Node
|
||||
{
|
||||
[Export]
|
||||
public PackedScene MobScene { get; set; }
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
GetNode<Control>("UserInterface/Retry").Hide();
|
||||
}
|
||||
|
||||
public override void _UnhandledInput(InputEvent inputEvent)
|
||||
{
|
||||
if (inputEvent.IsActionPressed("ui_accept") && GetNode<Control>("UserInterface/Retry").Visible)
|
||||
{
|
||||
// This restarts the current scene.
|
||||
GetTree().ReloadCurrentScene();
|
||||
}
|
||||
}
|
||||
|
||||
// We also specified this function name in PascalCase in the editor's connection window
|
||||
private void OnMobTimerTimeout()
|
||||
{
|
||||
// Create a new instance of the Mob scene.
|
||||
Mob mob = MobScene.Instantiate<Mob>();
|
||||
|
||||
// Choose a random location on the SpawnPath.
|
||||
// We store the reference to the SpawnLocation node.
|
||||
PathFollow3D mobSpawnLocation = GetNode<PathFollow3D>("SpawnPath/SpawnLocation");
|
||||
// And give it a random offset.
|
||||
mobSpawnLocation.ProgressRatio = GD.Randf();
|
||||
|
||||
Vector3 playerPosition = GetNode<Player>("Player").Position;
|
||||
mob.Initialize(mobSpawnLocation.Position, playerPosition);
|
||||
|
||||
// Spawn the mob by adding it to the Main scene.
|
||||
AddChild(mob);
|
||||
|
||||
// We connect the mob to the score label to update the score upon squashing one.
|
||||
mob.Squashed += GetNode<ScoreLabel>("UserInterface/ScoreLabel").OnMobSquashed;
|
||||
}
|
||||
|
||||
// We also specified this function name in PascalCase in the editor's connection window
|
||||
private void OnPlayerHit()
|
||||
{
|
||||
GetNode<Timer>("MobTimer").Stop();
|
||||
GetNode<Control>("UserInterface/Retry").Show();
|
||||
}
|
||||
}
|
||||
1
mono/squash_the_creeps/Main.cs.uid
Normal file
1
mono/squash_the_creeps/Main.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c8umv6ecqjaba
|
||||
155
mono/squash_the_creeps/Main.tscn
Normal file
155
mono/squash_the_creeps/Main.tscn
Normal file
@@ -0,0 +1,155 @@
|
||||
[gd_scene load_steps=15 format=3 uid="uid://bbwavbqpv0ge7"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c8umv6ecqjaba" path="res://Main.cs" id="1_ecxn0"]
|
||||
[ext_resource type="PackedScene" uid="uid://bdqntdek3u7aw" path="res://Mob.tscn" id="2_i3afp"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnorrme8hfbsx" path="res://Player.tscn" id="3_g20lh"]
|
||||
[ext_resource type="FontFile" uid="uid://755mnwjmjuro" path="res://fonts/Montserrat-Medium.ttf" id="4_c7ism"]
|
||||
[ext_resource type="Script" uid="uid://cvjobwmvp5ysd" path="res://ScoreLabel.cs" id="5_61u28"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_fo0kv"]
|
||||
size = Vector3(60, 2, 60)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_vxe8p"]
|
||||
size = Vector3(60, 2, 60)
|
||||
|
||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_2qp7p"]
|
||||
sky_horizon_color = Color(0.647059, 0.654902, 0.670588, 1)
|
||||
|
||||
[sub_resource type="Sky" id="Sky_j5vrg"]
|
||||
sky_material = SubResource("ProceduralSkyMaterial_2qp7p")
|
||||
|
||||
[sub_resource type="Environment" id="Environment_t6dwr"]
|
||||
background_mode = 2
|
||||
sky = SubResource("Sky_j5vrg")
|
||||
tonemap_mode = 2
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_po4ef"]
|
||||
albedo_color = Color(0.97, 0.549667, 0, 1)
|
||||
|
||||
[sub_resource type="CylinderMesh" id="CylinderMesh_hgo3b"]
|
||||
material = SubResource("StandardMaterial3D_po4ef")
|
||||
|
||||
[sub_resource type="Curve3D" id="Curve3D_kyctn"]
|
||||
_data = {
|
||||
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, -16.5959, 0, -17.8175, 0, 0, 0, 0, 0, 0, 16.5117, 0, -17.8175, 0, 0, 0, 0, 0, 0, 16.5959, 0, 18.1544, 0, 0, 0, 0, 0, 0, -16.7644, 0, 18.1544, 0, 0, 0, 0, 0, 0, -16.5959, 0, -17.8175),
|
||||
"tilts": PackedFloat32Array(0, 0, 0, 0, 0)
|
||||
}
|
||||
point_count = 5
|
||||
|
||||
[sub_resource type="Theme" id="Theme_uubu5"]
|
||||
default_font = ExtResource("4_c7ism")
|
||||
default_font_size = 22
|
||||
|
||||
[node name="Main" type="Node"]
|
||||
script = ExtResource("1_ecxn0")
|
||||
MobScene = ExtResource("2_i3afp")
|
||||
|
||||
[node name="Ground" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
|
||||
collision_layer = 4
|
||||
collision_mask = 0
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ground"]
|
||||
shape = SubResource("BoxShape3D_fo0kv")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Ground"]
|
||||
mesh = SubResource("BoxMesh_vxe8p")
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||
transform = Transform3D(0.5, -0.777049, 0.382355, 0, 0.441506, 0.897258, -0.866025, -0.448629, 0.220753, 0, 12.5592, 14.7757)
|
||||
shadow_enabled = true
|
||||
shadow_bias = 0.04
|
||||
shadow_blur = 1.5
|
||||
directional_shadow_mode = 0
|
||||
directional_shadow_fade_start = 1.0
|
||||
directional_shadow_max_distance = 40.0
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource("Environment_t6dwr")
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("3_g20lh")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.66792, 0)
|
||||
|
||||
[node name="CameraPivot" type="Marker3D" parent="."]
|
||||
transform = Transform3D(1, -5.95416e-16, 2.4663e-16, 2.4663e-16, 0.707107, 0.707107, -5.95416e-16, -0.707107, 0.707107, 0, 0, 0)
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="CameraPivot"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.08165e-12, 2.08165e-12, 19)
|
||||
projection = 1
|
||||
current = true
|
||||
size = 24.0
|
||||
far = 40.0
|
||||
|
||||
[node name="Cylinders" type="Node3D" parent="."]
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Cylinders"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.6028, 0, -17.8799)
|
||||
mesh = SubResource("CylinderMesh_hgo3b")
|
||||
|
||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Cylinders"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 16.5115, 0, -17.7887)
|
||||
mesh = SubResource("CylinderMesh_hgo3b")
|
||||
|
||||
[node name="MeshInstance3D3" type="MeshInstance3D" parent="Cylinders"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 16.5115, 0, 18.2448)
|
||||
mesh = SubResource("CylinderMesh_hgo3b")
|
||||
|
||||
[node name="MeshInstance3D4" type="MeshInstance3D" parent="Cylinders"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.7074, 0, 18.077)
|
||||
mesh = SubResource("CylinderMesh_hgo3b")
|
||||
|
||||
[node name="SpawnPath" type="Path3D" parent="."]
|
||||
curve = SubResource("Curve3D_kyctn")
|
||||
|
||||
[node name="SpawnLocation" type="PathFollow3D" parent="SpawnPath"]
|
||||
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -16.5959, 0, -17.8175)
|
||||
|
||||
[node name="MobTimer" type="Timer" parent="."]
|
||||
wait_time = 0.5
|
||||
autostart = true
|
||||
|
||||
[node name="UserInterface" type="Control" parent="."]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = SubResource("Theme_uubu5")
|
||||
|
||||
[node name="ScoreLabel" type="Label" parent="UserInterface"]
|
||||
layout_mode = 0
|
||||
offset_left = 16.0
|
||||
offset_top = 16.0
|
||||
offset_right = 144.0
|
||||
offset_bottom = 56.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "Score: 0"
|
||||
script = ExtResource("5_61u28")
|
||||
|
||||
[node name="Retry" type="ColorRect" parent="UserInterface"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0, 0, 0, 0.376471)
|
||||
|
||||
[node name="Label" type="Label" parent="UserInterface/Retry"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -106.5
|
||||
offset_top = -14.0
|
||||
offset_right = 106.5
|
||||
offset_bottom = 14.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
text = "Press Enter to retry"
|
||||
|
||||
[connection signal="Hit" from="Player" to="." method="OnPlayerHit"]
|
||||
[connection signal="timeout" from="MobTimer" to="." method="OnMobTimerTimeout"]
|
||||
53
mono/squash_the_creeps/Mob.cs
Normal file
53
mono/squash_the_creeps/Mob.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using Godot;
|
||||
|
||||
public partial class Mob : CharacterBody3D
|
||||
{
|
||||
// Emitted when the player jumped on the mob.
|
||||
[Signal]
|
||||
public delegate void SquashedEventHandler();
|
||||
|
||||
// Minimum speed of the mob in meters per second
|
||||
[Export]
|
||||
public int MinSpeed { get; set; } = 10;
|
||||
// Maximum speed of the mob in meters per second
|
||||
[Export]
|
||||
public int MaxSpeed { get; set; } = 18;
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
MoveAndSlide();
|
||||
}
|
||||
|
||||
// This function will be called from the Main scene.
|
||||
public void Initialize(Vector3 startPosition, Vector3 playerPosition)
|
||||
{
|
||||
// We position the mob by placing it at startPosition
|
||||
// and rotate it towards playerPosition, so it looks at the player.
|
||||
LookAtFromPosition(startPosition, playerPosition, Vector3.Up);
|
||||
// Rotate this mob randomly within range of -45 and +45 degrees,
|
||||
// so that it doesn't move directly towards the player.
|
||||
RotateY((float)GD.RandRange(-Mathf.Pi / 4.0, Mathf.Pi / 4.0));
|
||||
|
||||
// We calculate a random speed (integer).
|
||||
int randomSpeed = GD.RandRange(MinSpeed, MaxSpeed);
|
||||
// We calculate a forward velocity that represents the speed.
|
||||
Velocity = Vector3.Forward * randomSpeed;
|
||||
// We then rotate the velocity vector based on the mob's Y rotation
|
||||
// in order to move in the direction the mob is looking.
|
||||
Velocity = Velocity.Rotated(Vector3.Up, Rotation.Y);
|
||||
|
||||
GetNode<AnimationPlayer>("AnimationPlayer").SpeedScale = randomSpeed / MinSpeed;
|
||||
}
|
||||
|
||||
public void Squash()
|
||||
{
|
||||
EmitSignal(SignalName.Squashed);
|
||||
QueueFree(); // Destroy this node.
|
||||
}
|
||||
|
||||
// We also specified this function name in PascalCase in the editor's connection window
|
||||
private void OnVisibleOnScreenNotifierScreenExited()
|
||||
{
|
||||
QueueFree();
|
||||
}
|
||||
}
|
||||
1
mono/squash_the_creeps/Mob.cs.uid
Normal file
1
mono/squash_the_creeps/Mob.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bd60cryq25wly
|
||||
68
mono/squash_the_creeps/Mob.tscn
Normal file
68
mono/squash_the_creeps/Mob.tscn
Normal file
@@ -0,0 +1,68 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://bdqntdek3u7aw"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bd60cryq25wly" path="res://Mob.cs" id="1_g64pt"]
|
||||
[ext_resource type="PackedScene" uid="uid://b1kcqfya734dq" path="res://art/mob.glb" id="2_e23op"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_svwdt"]
|
||||
size = Vector3(1.358, 1.088, 2.201)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_t3png"]
|
||||
resource_name = "float"
|
||||
length = 1.2
|
||||
loop_mode = 1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Pivot/Character:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0.3, 0.7, 1.2),
|
||||
"transitions": PackedFloat32Array(0.420448, 2.07053, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(2.08165e-12, 0.33, 2.08165e-12), Vector3(2.08165e-12, 0.65, 2.08165e-12), Vector3(2.08165e-12, 0.35, 2.08165e-12)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Pivot/Character:rotation")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0.1, 0.5, 1.2),
|
||||
"transitions": PackedFloat32Array(0.420448, 0.450625, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0), Vector3(0.139626, 3.48787e-16, 3.48787e-16), Vector3(-0.15708, 3.48787e-16, 3.48787e-16)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_sw56c"]
|
||||
_data = {
|
||||
&"float": SubResource("Animation_t3png")
|
||||
}
|
||||
|
||||
[node name="Mob" type="CharacterBody3D" groups=["mob"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.08165e-12, 0.011, 2.08165e-12)
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
script = ExtResource("1_g64pt")
|
||||
|
||||
[node name="Pivot" type="Node3D" parent="."]
|
||||
|
||||
[node name="Character" parent="Pivot" instance=ExtResource("2_e23op")]
|
||||
transform = Transform3D(1, -4.03349e-16, 3.44493e-16, 3.44493e-16, 0.987688, 0.156434, -4.03349e-16, -0.156434, 0.987688, 2.08165e-12, 0.35, 2.08165e-12)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.08165e-12, 0.528, 2.08165e-12)
|
||||
shape = SubResource("BoxShape3D_svwdt")
|
||||
|
||||
[node name="VisibleOnScreenNotifier3D" type="VisibleOnScreenNotifier3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.08165e-12, 0.062, 0.332)
|
||||
aabb = AABB(-1.2, 0.251, -1.571, 2.41, 1.093, 3.172)
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_sw56c")
|
||||
}
|
||||
autoplay = "float"
|
||||
|
||||
[connection signal="screen_exited" from="VisibleOnScreenNotifier3D" to="." method="OnVisibleOnScreenNotifierScreenExited"]
|
||||
7
mono/squash_the_creeps/MusicPlayer.tscn
Normal file
7
mono/squash_the_creeps/MusicPlayer.tscn
Normal file
@@ -0,0 +1,7 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://ml76m4c5tsyn"]
|
||||
|
||||
[ext_resource type="AudioStream" uid="uid://fx12pc5y5syy" path="res://art/House In a Forest Loop.ogg" id="1_x2nla"]
|
||||
|
||||
[node name="MusicPlayer" type="AudioStreamPlayer"]
|
||||
stream = ExtResource("1_x2nla")
|
||||
autoplay = true
|
||||
120
mono/squash_the_creeps/Player.cs
Normal file
120
mono/squash_the_creeps/Player.cs
Normal file
@@ -0,0 +1,120 @@
|
||||
using Godot;
|
||||
|
||||
public partial class Player : CharacterBody3D
|
||||
{
|
||||
// Emitted when the player was hit by a mob.
|
||||
[Signal]
|
||||
public delegate void HitEventHandler();
|
||||
|
||||
// How fast the player moves in meters per second.
|
||||
[Export]
|
||||
public int Speed { get; set; } = 14;
|
||||
// The downward acceleration when in the air, in meters per second squared.
|
||||
[Export]
|
||||
public int FallAcceleration { get; set; } = 75;
|
||||
// Vertical impulse applied to the character upon jumping in meters per second.
|
||||
[Export]
|
||||
public int JumpImpulse { get; set; } = 20;
|
||||
// Vertical impulse applied to the character upon bouncing over a mob in meters per second.
|
||||
[Export]
|
||||
public int BounceImpulse { get; set; } = 16;
|
||||
|
||||
private Vector3 _targetVelocity = Vector3.Zero;
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
// We create a local variable to store the input direction.
|
||||
Vector3 direction = Vector3.Zero;
|
||||
|
||||
// We check for each move input and update the direction accordingly.
|
||||
if (Input.IsActionPressed("move_right"))
|
||||
{
|
||||
direction.X += 1.0f;
|
||||
}
|
||||
if (Input.IsActionPressed("move_left"))
|
||||
{
|
||||
direction.X -= 1.0f;
|
||||
}
|
||||
if (Input.IsActionPressed("move_back"))
|
||||
{
|
||||
// Notice how we are working with the vector's X and Z axes.
|
||||
// In 3D, the XZ plane is the ground plane.
|
||||
direction.Z += 1.0f;
|
||||
}
|
||||
if (Input.IsActionPressed("move_forward"))
|
||||
{
|
||||
direction.Z -= 1.0f;
|
||||
}
|
||||
|
||||
// Prevent diagonal movement being very fast.
|
||||
if (direction != Vector3.Zero)
|
||||
{
|
||||
direction = direction.Normalized();
|
||||
// Setting the basis property will affect the rotation of the node.
|
||||
GetNode<Node3D>("Pivot").Basis = Basis.LookingAt(direction);
|
||||
GetNode<AnimationPlayer>("AnimationPlayer").SpeedScale = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
GetNode<AnimationPlayer>("AnimationPlayer").SpeedScale = 1;
|
||||
}
|
||||
|
||||
// Ground velocity
|
||||
_targetVelocity.X = direction.X * Speed;
|
||||
_targetVelocity.Z = direction.Z * Speed;
|
||||
|
||||
// Vertical velocity
|
||||
if (!IsOnFloor())
|
||||
{
|
||||
_targetVelocity.Y -= FallAcceleration * (float)delta;
|
||||
}
|
||||
|
||||
// Jumping.
|
||||
if (IsOnFloor() && Input.IsActionJustPressed("jump"))
|
||||
{
|
||||
_targetVelocity.Y = JumpImpulse;
|
||||
}
|
||||
|
||||
// Iterate through all collisions that occurred this frame.
|
||||
for (int index = 0; index < GetSlideCollisionCount(); index++)
|
||||
{
|
||||
// We get one of the collisions with the player.
|
||||
KinematicCollision3D collision = GetSlideCollision(index);
|
||||
|
||||
// If the collision is with a mob.
|
||||
// With C# we leverage typing and pattern-matching
|
||||
// instead of checking for the group we created.
|
||||
if (collision.GetCollider() is Mob mob)
|
||||
{
|
||||
// We check that we are hitting it from above.
|
||||
if (Vector3.Up.Dot(collision.GetNormal()) > 0.1f)
|
||||
{
|
||||
// If so, we squash it and bounce.
|
||||
mob.Squash();
|
||||
_targetVelocity.Y = BounceImpulse;
|
||||
// Prevent further duplicate calls.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Moving the character
|
||||
Velocity = _targetVelocity;
|
||||
MoveAndSlide();
|
||||
|
||||
Node3D pivot = GetNode<Node3D>("Pivot");
|
||||
pivot.Rotation = new Vector3(Mathf.Pi / 6.0f * Velocity.Y / JumpImpulse, pivot.Rotation.Y, pivot.Rotation.Z);
|
||||
}
|
||||
|
||||
private void Die()
|
||||
{
|
||||
EmitSignal(SignalName.Hit);
|
||||
QueueFree();
|
||||
}
|
||||
|
||||
// We also specified this function name in PascalCase in the editor's connection window
|
||||
private void OnMobDetectorBodyEntered(Node3D body)
|
||||
{
|
||||
Die();
|
||||
}
|
||||
}
|
||||
1
mono/squash_the_creeps/Player.cs.uid
Normal file
1
mono/squash_the_creeps/Player.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://conoco5fix3jd
|
||||
103
mono/squash_the_creeps/Player.tscn
Normal file
103
mono/squash_the_creeps/Player.tscn
Normal file
@@ -0,0 +1,103 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://bnorrme8hfbsx"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dql7oordfphqf" path="res://art/player.glb" id="1_feavy"]
|
||||
[ext_resource type="Script" uid="uid://conoco5fix3jd" path="res://Player.cs" id="1_q8lbo"]
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_s8xr1"]
|
||||
radius = 0.792
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_6327m"]
|
||||
height = 0.144
|
||||
radius = 0.908
|
||||
|
||||
[sub_resource type="Animation" id="Animation_7xhch"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Pivot/Character:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(2.08165e-12, 0.33, 2.08165e-12)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Pivot/Character:rotation")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_03s6x"]
|
||||
resource_name = "float"
|
||||
length = 1.2
|
||||
loop_mode = 1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Pivot/Character:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0.3, 0.7, 1.2),
|
||||
"transitions": PackedFloat32Array(0.420448, 2.07053, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(2.08165e-12, 0.33, 2.08165e-12), Vector3(2.08165e-12, 0.65, 2.08165e-12), Vector3(2.08165e-12, 0.35, 2.08165e-12)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Pivot/Character:rotation")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0.1, 0.5, 1.2),
|
||||
"transitions": PackedFloat32Array(0.420448, 0.450625, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0), Vector3(0.139626, 3.48787e-16, 3.48787e-16), Vector3(-0.15708, 3.48787e-16, 3.48787e-16)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_x6efk"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_7xhch"),
|
||||
&"float": SubResource("Animation_03s6x")
|
||||
}
|
||||
|
||||
[node name="Player" type="CharacterBody3D"]
|
||||
collision_mask = 6
|
||||
script = ExtResource("1_q8lbo")
|
||||
|
||||
[node name="Pivot" type="Node3D" parent="."]
|
||||
|
||||
[node name="Character" parent="Pivot" instance=ExtResource("1_feavy")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.08165e-12, 0.33, 2.08165e-12)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.08165e-12, 0.772, 2.08165e-12)
|
||||
shape = SubResource("SphereShape3D_s8xr1")
|
||||
|
||||
[node name="MobDetector" type="Area3D" parent="."]
|
||||
collision_layer = 0
|
||||
collision_mask = 2
|
||||
monitorable = false
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="MobDetector"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.08165e-12, 1.065, 2.08165e-12)
|
||||
shape = SubResource("CylinderShape3D_6327m")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_x6efk")
|
||||
}
|
||||
autoplay = "float"
|
||||
|
||||
[connection signal="body_entered" from="MobDetector" to="." method="OnMobDetectorBodyEntered"]
|
||||
40
mono/squash_the_creeps/README.md
Normal file
40
mono/squash_the_creeps/README.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# Squash the Creeps (3D)
|
||||
|
||||
This is a simple game where your character must move
|
||||
and jump to squash as many enemies for as long as possible.
|
||||
You gain 1 point for every enemy squashed.
|
||||
|
||||
Controls:
|
||||
|
||||
- <kbd>Up Arrow</kbd>, <kbd>W</kbd>, <kbd>Gamepad Left Stick</kbd>: Move up
|
||||
- <kbd>Down Arrow</kbd>, <kbd>S</kbd>, <kbd>Gamepad Left Stick</kbd>: Move down
|
||||
- <kbd>Left Arrow</kbd>, <kbd>Gamepad Left Stick</kbd>: Move left
|
||||
- <kbd>Right Arrow</kbd>, <kbd>Gamepad Left Stick</kbd>: Move right
|
||||
- <kbd>Space</kbd>, <kbd>Right Mouse Button</kbd>, <kbd>Gamepad A/Cross</kbd>: Jump
|
||||
|
||||
This is a finished version of the game featured in the
|
||||
["Your first 3D game"](https://docs.godotengine.org/en/latest/getting_started/first_3d_game/index.html)
|
||||
tutorial in the documentation. For more details,
|
||||
consider following the tutorial in the documentation.
|
||||
|
||||
This demo covers:
|
||||
|
||||
- Handling player input.
|
||||
- Moving and jumping in a 3D game.
|
||||
- Spawning enemies randomly around the game arena.
|
||||
- Using the built-in animation editor to breathe life to your game.
|
||||
- Creating a complete game loop with lose conditions, score, and the ability to restart.
|
||||
|
||||
Language: C#
|
||||
|
||||
Renderer: Forward+
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||
|
||||
## Copying
|
||||
|
||||
`art/House In a Forest Loop.ogg` Copyright © 2012 [HorrorPen](https://opengameart.org/users/horrorpen), [CC-BY 3.0: Attribution](http://creativecommons.org/licenses/by/3.0/). Source: https://opengameart.org/content/loop-house-in-a-forest
|
||||
|
||||
Font is "Montserrat Medium". Copyright 2011 [The Montserrat Project Authors](https://github.com/JulietaUla/Montserrat). Details are in `fonts/LICENSE.txt`.
|
||||
12
mono/squash_the_creeps/ScoreLabel.cs
Normal file
12
mono/squash_the_creeps/ScoreLabel.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Godot;
|
||||
|
||||
public partial class ScoreLabel : Label
|
||||
{
|
||||
private int _score = 0;
|
||||
|
||||
public void OnMobSquashed()
|
||||
{
|
||||
_score += 1;
|
||||
Text = $"Score: {_score}";
|
||||
}
|
||||
}
|
||||
1
mono/squash_the_creeps/ScoreLabel.cs.uid
Normal file
1
mono/squash_the_creeps/ScoreLabel.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cvjobwmvp5ysd
|
||||
7
mono/squash_the_creeps/Squash the Creeps (3D).csproj
Normal file
7
mono/squash_the_creeps/Squash the Creeps (3D).csproj
Normal file
@@ -0,0 +1,7 @@
|
||||
<Project Sdk="Godot.NET.Sdk/4.5.0">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
<RootNamespace>SquashtheCreeps3D</RootNamespace>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
19
mono/squash_the_creeps/Squash the Creeps (3D).sln
Normal file
19
mono/squash_the_creeps/Squash the Creeps (3D).sln
Normal file
@@ -0,0 +1,19 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Squash the Creeps (3D)", "Squash the Creeps (3D).csproj", "{37665D7D-B685-472E-A0F3-35CFA698977E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
ExportDebug|Any CPU = ExportDebug|Any CPU
|
||||
ExportRelease|Any CPU = ExportRelease|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{37665D7D-B685-472E-A0F3-35CFA698977E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{37665D7D-B685-472E-A0F3-35CFA698977E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{37665D7D-B685-472E-A0F3-35CFA698977E}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
|
||||
{37665D7D-B685-472E-A0F3-35CFA698977E}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
|
||||
{37665D7D-B685-472E-A0F3-35CFA698977E}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
|
||||
{37665D7D-B685-472E-A0F3-35CFA698977E}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
mono/squash_the_creeps/art/House In a Forest Loop.ogg
Normal file
BIN
mono/squash_the_creeps/art/House In a Forest Loop.ogg
Normal file
Binary file not shown.
19
mono/squash_the_creeps/art/House In a Forest Loop.ogg.import
Normal file
19
mono/squash_the_creeps/art/House In a Forest Loop.ogg.import
Normal file
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOggVorbis"
|
||||
uid="uid://fx12pc5y5syy"
|
||||
path="res://.godot/imported/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggvorbisstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/House In a Forest Loop.ogg"
|
||||
dest_files=["res://.godot/imported/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggvorbisstr"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
mono/squash_the_creeps/art/body.material
Normal file
BIN
mono/squash_the_creeps/art/body.material
Normal file
Binary file not shown.
BIN
mono/squash_the_creeps/art/eye.material
Normal file
BIN
mono/squash_the_creeps/art/eye.material
Normal file
Binary file not shown.
BIN
mono/squash_the_creeps/art/mob.glb
Normal file
BIN
mono/squash_the_creeps/art/mob.glb
Normal file
Binary file not shown.
42
mono/squash_the_creeps/art/mob.glb.import
Normal file
42
mono/squash_the_creeps/art/mob.glb.import
Normal file
@@ -0,0 +1,42 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://b1kcqfya734dq"
|
||||
path="res://.godot/imported/mob.glb-3afb43c03b9d1598b6af5154e2543eac.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/mob.glb"
|
||||
dest_files=["res://.godot/imported/mob.glb-3afb43c03b9d1598b6af5154e2543eac.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type="Spatial"
|
||||
nodes/root_name="Scene Root"
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=false
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=0
|
||||
meshes/lightmap_texel_size=0.1
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=15
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
gltf/naming_version=0
|
||||
gltf/embedded_image_handling=1
|
||||
BIN
mono/squash_the_creeps/art/mob_body.material
Normal file
BIN
mono/squash_the_creeps/art/mob_body.material
Normal file
Binary file not shown.
BIN
mono/squash_the_creeps/art/mob_eye.material
Normal file
BIN
mono/squash_the_creeps/art/mob_eye.material
Normal file
Binary file not shown.
BIN
mono/squash_the_creeps/art/player.glb
Normal file
BIN
mono/squash_the_creeps/art/player.glb
Normal file
Binary file not shown.
42
mono/squash_the_creeps/art/player.glb.import
Normal file
42
mono/squash_the_creeps/art/player.glb.import
Normal file
@@ -0,0 +1,42 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://dql7oordfphqf"
|
||||
path="res://.godot/imported/player.glb-08dcfb373480a049995065542e37637b.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/player.glb"
|
||||
dest_files=["res://.godot/imported/player.glb-08dcfb373480a049995065542e37637b.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type="Spatial"
|
||||
nodes/root_name="Scene Root"
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=false
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=0
|
||||
meshes/lightmap_texel_size=0.1
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=15
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
gltf/naming_version=0
|
||||
gltf/embedded_image_handling=1
|
||||
BIN
mono/squash_the_creeps/art/pupil.material
Normal file
BIN
mono/squash_the_creeps/art/pupil.material
Normal file
Binary file not shown.
43
mono/squash_the_creeps/fonts/LICENSE.txt
Normal file
43
mono/squash_the_creeps/fonts/LICENSE.txt
Normal file
@@ -0,0 +1,43 @@
|
||||
Copyright 2011 The Montserrat Project Authors (https://github.com/JulietaUla/Montserrat)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
|
||||
|
||||
—————————————————————————————-
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
—————————————————————————————-
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
“Font Software” refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
|
||||
|
||||
“Reserved Font Name” refers to any names specified as such after the copyright statement(s).
|
||||
|
||||
“Original Version” refers to the collection of Font Software components as distributed by the Copyright Holder(s).
|
||||
|
||||
“Modified Version” refers to any derivative made by adding to, deleting, or substituting—in part or in whole—any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
|
||||
|
||||
“Author” refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
BIN
mono/squash_the_creeps/fonts/Montserrat-Medium.ttf
Normal file
BIN
mono/squash_the_creeps/fonts/Montserrat-Medium.ttf
Normal file
Binary file not shown.
36
mono/squash_the_creeps/fonts/Montserrat-Medium.ttf.import
Normal file
36
mono/squash_the_creeps/fonts/Montserrat-Medium.ttf.import
Normal file
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://755mnwjmjuro"
|
||||
path="res://.godot/imported/Montserrat-Medium.ttf-e832861e4ad4110e172112dc430c04b0.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://fonts/Montserrat-Medium.ttf"
|
||||
dest_files=["res://.godot/imported/Montserrat-Medium.ttf-e832861e4ad4110e172112dc430c04b0.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
modulate_color_glyphs=false
|
||||
hinting=1
|
||||
subpixel_positioning=1
|
||||
keep_rounding_remainders=true
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
BIN
mono/squash_the_creeps/icon.png
Normal file
BIN
mono/squash_the_creeps/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
40
mono/squash_the_creeps/icon.png.import
Normal file
40
mono/squash_the_creeps/icon.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c4seg71mxeaih"
|
||||
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.png"
|
||||
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
1
mono/squash_the_creeps/icon.svg
Normal file
1
mono/squash_the_creeps/icon.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg height="128" width="128" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2" width="124" height="124" rx="14" fill="#363d52" stroke="#212532" stroke-width="4"/><g transform="scale(.101) translate(122 122)"><g fill="#fff"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 813 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H447l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c3 34 55 34 58 0v-86c-3-34-55-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 950 B |
43
mono/squash_the_creeps/icon.svg.import
Normal file
43
mono/squash_the_creeps/icon.svg.import
Normal file
@@ -0,0 +1,43 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dj6niedj41hud"
|
||||
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.svg"
|
||||
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
100
mono/squash_the_creeps/project.godot
Normal file
100
mono/squash_the_creeps/project.godot
Normal file
@@ -0,0 +1,100 @@
|
||||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=5
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Squash the Creeps (3D) with C#"
|
||||
config/description="In this game, your goal is to chase and kick out the creeps!
|
||||
|
||||
This is a finished version of the game featured in the \"Your first 3D game\"
|
||||
tutorial in the official documentation, but ported to C#. For more details,
|
||||
consider following the tutorial in the documentation."
|
||||
config/tags=PackedStringArray("3d", "demo", "official")
|
||||
run/main_scene="res://Main.tscn"
|
||||
config/features=PackedStringArray("4.5", "C#", "Forward Plus")
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[autoload]
|
||||
|
||||
MusicPlayer="*res://MusicPlayer.tscn"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=720
|
||||
window/size/viewport_height=540
|
||||
window/stretch/mode="canvas_items"
|
||||
window/stretch/aspect="expand"
|
||||
window/size/width=720
|
||||
window/size/height=540
|
||||
window/size/test_width=480
|
||||
window/size/test_height=360
|
||||
|
||||
[dotnet]
|
||||
|
||||
project/assembly_name="Squash the Creeps (3D)"
|
||||
|
||||
[filesystem]
|
||||
|
||||
import/blender/enabled=false
|
||||
|
||||
[input]
|
||||
|
||||
move_left={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
move_right={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
move_forward={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
move_back={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
jump={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[layer_names]
|
||||
|
||||
3d_physics/layer_1="player"
|
||||
3d_physics/layer_2="enemies"
|
||||
3d_physics/layer_3="world"
|
||||
|
||||
[physics]
|
||||
|
||||
common/physics_ticks_per_second=120
|
||||
|
||||
[rendering]
|
||||
|
||||
anti_aliasing/quality/msaa_3d=2
|
||||
quality/driver/driver_name="GLES2"
|
||||
vram_compression/import_etc=true
|
||||
vram_compression/import_etc2=false
|
||||
quality/filters/msaa=3
|
||||
0
mono/squash_the_creeps/screenshots/.gdignore
Normal file
0
mono/squash_the_creeps/screenshots/.gdignore
Normal file
BIN
mono/squash_the_creeps/screenshots/squash_the_creeps.webp
Normal file
BIN
mono/squash_the_creeps/screenshots/squash_the_creeps.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
Reference in New Issue
Block a user