Move about the GoDot geezers boat race
This commit is contained in:
8
Broken People.csproj
Normal file
8
Broken People.csproj
Normal file
@@ -0,0 +1,8 @@
|
||||
<Project Sdk="Godot.NET.Sdk/4.7.1">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net9.0</TargetFramework>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
<RootNamespace>BrokenPeople</RootNamespace>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
19
Broken People.sln
Normal file
19
Broken People.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}") = "Broken People", "Broken People.csproj", "{A0F3457E-9347-4137-A31C-4A33B9855450}"
|
||||
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
|
||||
{A0F3457E-9347-4137-A31C-4A33B9855450}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A0F3457E-9347-4137-A31C-4A33B9855450}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A0F3457E-9347-4137-A31C-4A33B9855450}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
|
||||
{A0F3457E-9347-4137-A31C-4A33B9855450}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
|
||||
{A0F3457E-9347-4137-A31C-4A33B9855450}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
|
||||
{A0F3457E-9347-4137-A31C-4A33B9855450}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
31
Player.cs
Normal file
31
Player.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Godot;
|
||||
|
||||
public partial class Player : Sprite2D
|
||||
{
|
||||
// Speed in pixels per second
|
||||
private float _speed = 400.0f;
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
Vector2 velocity = Vector2.Zero;
|
||||
|
||||
if (Input.IsActionPressed("ui_right"))
|
||||
{
|
||||
velocity.X += 1.0f;
|
||||
}
|
||||
if (Input.IsActionPressed("ui_left"))
|
||||
{
|
||||
velocity.X -= 1.0f;
|
||||
}
|
||||
if (Input.IsActionPressed("ui_down"))
|
||||
{
|
||||
velocity.Y += 1.0f;
|
||||
}
|
||||
if (Input.IsActionPressed("ui_up"))
|
||||
{
|
||||
velocity.Y -= 1.0f;
|
||||
}
|
||||
|
||||
Position += velocity * _speed * (float)delta;
|
||||
}
|
||||
}
|
||||
1
Player.cs.uid
Normal file
1
Player.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cw3xemcqi21rw
|
||||
10
main.tscn
Normal file
10
main.tscn
Normal file
@@ -0,0 +1,10 @@
|
||||
[gd_scene format=3 uid="uid://cun63uvd6k6eg"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://chvsugc1m4gqu" path="res://icon.svg" id="1_0xm2m"]
|
||||
[ext_resource type="Script" uid="uid://cw3xemcqi21rw" path="res://Player.cs" id="2_0xm2m"]
|
||||
|
||||
[node name="Main" type="Node2D" unique_id=673288413]
|
||||
|
||||
[node name="Player" type="Sprite2D" parent="." unique_id=1433899478]
|
||||
texture = ExtResource("1_0xm2m")
|
||||
script = ExtResource("2_0xm2m")
|
||||
@@ -11,7 +11,8 @@ config_version=5
|
||||
[application]
|
||||
|
||||
config/name="Broken People"
|
||||
config/features=PackedStringArray("4.7", "GL Compatibility")
|
||||
run/main_scene="uid://cun63uvd6k6eg"
|
||||
config/features=PackedStringArray("4.7", "C#", "GL Compatibility")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[display]
|
||||
|
||||
Reference in New Issue
Block a user