Convert demos to Godot 4 using regular expressions in a script

This commit is contained in:
Aaron Franke
2022-03-26 05:00:50 -05:00
parent 410d783126
commit bbe50fc9da
1095 changed files with 13628 additions and 13557 deletions

View File

@@ -1,4 +1,4 @@
<Project Sdk="Godot.NET.Sdk/3.3.0">
<Project Sdk="Godot.NET.Sdk/4.0.0-dev5">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<RootNamespace>Demo</RootNamespace>

View File

@@ -11,7 +11,7 @@ using real_t = System.Single;
/// The transformation of its 2D form is controlled by its 3D child.
/// </summary>
[Tool]
public class Node25D : Node2D, IComparable<Node25D>
public partial class Node25D : Node2D, IComparable<Node25D>
{
/// <summary>
/// The number of 2D units in one 3D unit. Ideally, but not necessarily, an integer.
@@ -24,25 +24,25 @@ public class Node25D : Node2D, IComparable<Node25D>
{
if (spatialNode == null)
{
spatialNode = GetChild<Spatial>(0);
spatialNode = GetChild<Node3D>(0);
}
return spatialNode.Translation;
return spatialNode.Position;
}
set
{
transform25D.spatialPosition = value;
if (spatialNode != null)
{
spatialNode.Translation = value;
spatialNode.Position = value;
}
else if (GetChildCount() > 0)
{
spatialNode = GetChild<Spatial>(0);
spatialNode = GetChild<Node3D>(0);
}
}
}
private Spatial spatialNode;
private Node3D spatialNode;
private Transform25D transform25D;
public Basis25D Basis25D
@@ -72,7 +72,7 @@ public class Node25D : Node2D, IComparable<Node25D>
{
if (GetChildCount() > 0)
{
spatialNode = GetChild<Spatial>(0);
spatialNode = GetChild<Node3D>(0);
}
// Changing the basis here will change the default for all Node25D instances.
transform25D = new Transform25D(Basis25D.FortyFive * SCALE);
@@ -90,11 +90,11 @@ public class Node25D : Node2D, IComparable<Node25D>
CheckViewMode();
if (spatialNode != null)
{
transform25D.spatialPosition = spatialNode.Translation;
transform25D.spatialPosition = spatialNode.Position;
}
else if (GetChildCount() > 0)
{
spatialNode = GetChild<Spatial>(0);
spatialNode = GetChild<Node3D>(0);
}
GlobalPosition = transform25D.FlatPosition;

View File

@@ -11,20 +11,20 @@ using real_t = System.Single;
/// is below the target object in the scene tree (not as a child).
/// </summary>
[Tool]
public class ShadowMath25D : KinematicBody
public partial class ShadowMath25D : CharacterBody3D
{
/// <summary>
/// The maximum distance below objects that shadows will appear.
/// </summary>
public real_t shadowLength = 1000;
private Node25D shadowRoot;
private Spatial targetMath;
private Node3D targetMath;
public override void _Ready()
{
shadowRoot = GetParent<Node25D>();
int index = shadowRoot.GetPositionInParent();
targetMath = shadowRoot.GetParent().GetChild<Node25D>(index - 1).GetChild<Spatial>(0);
int index = shadowRoot.GetIndex();
targetMath = shadowRoot.GetParent().GetChild<Node25D>(index - 1).GetChild<Node3D>(0);
}
public override void _Process(real_t delta)
@@ -38,7 +38,7 @@ public class ShadowMath25D : KinematicBody
return; // Shadow is not in a valid place.
}
Translation = targetMath.Translation;
Position = targetMath.Position;
var k = MoveAndCollide(Vector3.Down * shadowLength);
if (k == null)
{

View File

@@ -10,7 +10,7 @@ using real_t = System.Single;
/// Assigns Z-index values to Node25D children.
/// </summary>
[Tool] // Commented out because it sometimes crashes the editor when running the game...
public class YSort25D : Node // Note: NOT Node2D, Node25D, or YSort
public partial class YSort25D : Node // Note: NOT Node2D, Node25D, or Node2D
{
/// <summary>
/// Whether or not to automatically call Sort() in _Process().

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/kinematic_body_25d.png-791432e863e44720a1390f5b1fbf09be.stex"
type="StreamTexture2D"
path="res://.godot/imported/kinematic_body_25d.png-791432e863e44720a1390f5b1fbf09be.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://addons/node25d-cs/icons/kinematic_body_25d.png"
dest_files=[ "res://.import/kinematic_body_25d.png-791432e863e44720a1390f5b1fbf09be.stex" ]
dest_files=["res://.godot/imported/kinematic_body_25d.png-791432e863e44720a1390f5b1fbf09be.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/node_25d.png-ecf0b5959e83c044c288582c27f3f4c9.stex"
type="StreamTexture2D"
path="res://.godot/imported/node_25d.png-ecf0b5959e83c044c288582c27f3f4c9.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://addons/node25d-cs/icons/node_25d.png"
dest_files=[ "res://.import/node_25d.png-ecf0b5959e83c044c288582c27f3f4c9.stex" ]
dest_files=["res://.godot/imported/node_25d.png-ecf0b5959e83c044c288582c27f3f4c9.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/node_25d_icon.png-c9b692824a2a2a3ddca2c0df67f60add.stex"
type="StreamTexture2D"
path="res://.godot/imported/node_25d_icon.png-c9b692824a2a2a3ddca2c0df67f60add.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://addons/node25d-cs/icons/node_25d_icon.png"
dest_files=[ "res://.import/node_25d_icon.png-c9b692824a2a2a3ddca2c0df67f60add.stex" ]
dest_files=["res://.godot/imported/node_25d_icon.png-c9b692824a2a2a3ddca2c0df67f60add.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/shadow_math_25d.png-0cd88127f233ec7b6b2959e12e9f275a.stex"
type="StreamTexture2D"
path="res://.godot/imported/shadow_math_25d.png-0cd88127f233ec7b6b2959e12e9f275a.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://addons/node25d-cs/icons/shadow_math_25d.png"
dest_files=[ "res://.import/shadow_math_25d.png-0cd88127f233ec7b6b2959e12e9f275a.stex" ]
dest_files=["res://.godot/imported/shadow_math_25d.png-0cd88127f233ec7b6b2959e12e9f275a.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/shadow_math_25d_icon.png-4dbc225f4d5f7ef06072b06e2f163301.stex"
type="StreamTexture2D"
path="res://.godot/imported/shadow_math_25d_icon.png-4dbc225f4d5f7ef06072b06e2f163301.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://addons/node25d-cs/icons/shadow_math_25d_icon.png"
dest_files=[ "res://.import/shadow_math_25d_icon.png-4dbc225f4d5f7ef06072b06e2f163301.stex" ]
dest_files=["res://.godot/imported/shadow_math_25d_icon.png-4dbc225f4d5f7ef06072b06e2f163301.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/viewport_25d.svg-104006b56693c8e3ae613ee52de431c7.stex"
type="StreamTexture2D"
path="res://.godot/imported/viewport_25d.svg-104006b56693c8e3ae613ee52de431c7.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://addons/node25d-cs/icons/viewport_25d.svg"
dest_files=[ "res://.import/viewport_25d.svg-104006b56693c8e3ae613ee52de431c7.stex" ]
dest_files=["res://.godot/imported/viewport_25d.svg-104006b56693c8e3ae613ee52de431c7.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/y_sort_25d.png-d7ffa1c0d05a9139ab514ec27ad8da9d.stex"
type="StreamTexture2D"
path="res://.godot/imported/y_sort_25d.png-d7ffa1c0d05a9139ab514ec27ad8da9d.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://addons/node25d-cs/icons/y_sort_25d.png"
dest_files=[ "res://.import/y_sort_25d.png-d7ffa1c0d05a9139ab514ec27ad8da9d.stex" ]
dest_files=["res://.godot/imported/y_sort_25d.png-d7ffa1c0d05a9139ab514ec27ad8da9d.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/y_sort_25d_icon.png-852bb2b2c54661e1957a46372d9a6d8f.stex"
type="StreamTexture2D"
path="res://.godot/imported/y_sort_25d_icon.png-852bb2b2c54661e1957a46372d9a6d8f.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://addons/node25d-cs/icons/y_sort_25d_icon.png"
dest_files=[ "res://.import/y_sort_25d_icon.png-852bb2b2c54661e1957a46372d9a6d8f.stex" ]
dest_files=["res://.godot/imported/y_sort_25d_icon.png-852bb2b2c54661e1957a46372d9a6d8f.stex"]
[params]

View File

@@ -2,7 +2,7 @@ using Godot;
// This is identical to the GDScript version, yet it doesn't work.
[Tool]
public class Viewport25D : Control
public partial class Viewport25D : Control
{
private int zoomLevel = 0;
private bool isPanning = false;
@@ -15,8 +15,8 @@ public class Viewport25D : Control
public EditorInterface editorInterface; // Set in node25d_plugin.gd
private bool moving = false;
private Viewport viewport2d;
private Viewport viewportOverlay;
private SubViewport viewport2d;
private SubViewport viewportOverlay;
private ButtonGroup viewModeButtonGroup;
private Label zoomLabel;
private PackedScene gizmo25dScene;
@@ -43,8 +43,8 @@ public class Viewport25D : Control
viewport2d.World2d = world2d;
// Onready vars.
viewport2d = GetNode<Viewport>("Viewport2D");
viewportOverlay = GetNode<Viewport>("ViewportOverlay");
viewport2d = GetNode<SubViewport>("Viewport2D");
viewportOverlay = GetNode<SubViewport>("ViewportOverlay");
viewModeButtonGroup = GetParent().GetNode("TopBar").GetNode("ViewModeButtons").GetNode<Button>("45Degree").Group;
zoomLabel = GetParent().GetNode("TopBar").GetNode("Zoom").GetNode<Label>("ZoomPercent");
gizmo25dScene = ResourceLoader.Load<PackedScene>("res://addons/node25d/main_screen/gizmo_25d.tscn");
@@ -69,21 +69,21 @@ public class Viewport25D : Control
}
// Zooming.
if (Input.IsMouseButtonPressed((int)ButtonList.WheelUp))
if (Input.IsMouseButtonPressed((int)MouseButton.WheelUp))
{
zoomLevel += 1;
}
else if (Input.IsMouseButtonPressed((int)ButtonList.WheelDown))
else if (Input.IsMouseButtonPressed((int)MouseButton.WheelDown))
{
zoomLevel -= 1;
}
float zoom = GetZoomAmount();
// Viewport size.
// SubViewport size.
Vector2 size = GetGlobalRect().Size;
viewport2d.Size = size;
// Viewport transform.
// SubViewport transform.
Transform2D viewportTrans = Transform2D.Identity;
viewportTrans.x *= zoom;
viewportTrans.y *= zoom;
@@ -124,7 +124,7 @@ public class Viewport25D : Control
}
if (newNode)
{
Gizmo25D gizmo = (Gizmo25D)gizmo25dScene.Instance();
Gizmo25D gizmo = (Gizmo25D)gizmo25dScene.Instantiate();
viewportOverlay.AddChild(gizmo);
gizmo.node25d = selected;
gizmo.Initialize();
@@ -140,23 +140,23 @@ public class Viewport25D : Control
{
if (mouseButtonEvent.IsPressed())
{
if ((ButtonList)mouseButtonEvent.ButtonIndex == ButtonList.WheelUp)
if ((MouseButton)mouseButtonEvent.ButtonIndex == MouseButton.WheelUp)
{
zoomLevel += 1;
AcceptEvent();
}
else if ((ButtonList)mouseButtonEvent.ButtonIndex == ButtonList.WheelDown)
else if ((MouseButton)mouseButtonEvent.ButtonIndex == MouseButton.WheelDown)
{
zoomLevel -= 1;
AcceptEvent();
}
else if ((ButtonList)mouseButtonEvent.ButtonIndex == ButtonList.Middle)
else if ((MouseButton)mouseButtonEvent.ButtonIndex == MouseButton.Middle)
{
isPanning = true;
panCenter = viewportCenter - mouseButtonEvent.Position;
AcceptEvent();
}
else if ((ButtonList)mouseButtonEvent.ButtonIndex == ButtonList.Left)
else if ((MouseButton)mouseButtonEvent.ButtonIndex == MouseButton.Left)
{
var overlayChildren2 = viewportOverlay.GetChildren();
foreach (Gizmo25D overlayChild in overlayChildren2)
@@ -166,12 +166,12 @@ public class Viewport25D : Control
AcceptEvent();
}
}
else if ((ButtonList)mouseButtonEvent.ButtonIndex == ButtonList.Middle)
else if ((MouseButton)mouseButtonEvent.ButtonIndex == MouseButton.Middle)
{
isPanning = false;
AcceptEvent();
}
else if ((ButtonList)mouseButtonEvent.ButtonIndex == ButtonList.Left)
else if ((MouseButton)mouseButtonEvent.ButtonIndex == MouseButton.Left)
{
var overlayChildren3 = viewportOverlay.GetChildren();
foreach (Gizmo25D overlayChild in overlayChildren3)

View File

@@ -2,7 +2,7 @@ using Godot;
// This is identical to the GDScript version, yet it doesn't work.
[Tool]
public class Gizmo25D : Node2D
public partial class Gizmo25D : Node2D
{
// Not pixel perfect for all axes in all modes, but works well enough.
// Rounding is not done until after the movement is finished.
@@ -10,7 +10,7 @@ public class Gizmo25D : Node2D
// Set when the node is created.
public Node25D node25d;
public Spatial spatialNode;
public Node3D spatialNode;
// Input from Viewport25D, represents if the mouse is clicked.
public bool wantsToMove = false;
@@ -106,7 +106,7 @@ public class Gizmo25D : Node2D
movement *= -1;
}
// Apply movement.
Transform t = spatialNode.Transform;
Transform3D t = spatialNode.Transform;
t.origin += t.basis[dominantAxis] * movement;
spatialNode.Transform = t;
}
@@ -116,7 +116,7 @@ public class Gizmo25D : Node2D
GlobalPosition = node25d.GlobalPosition;
if (RoughlyRoundToPixels)
{
Transform t = spatialNode.Transform;
Transform3D t = spatialNode.Transform;
t.origin = (t.origin * Node25D.SCALE).Round() / Node25D.SCALE;
spatialNode.Transform = t;
}
@@ -136,7 +136,7 @@ public class Gizmo25D : Node2D
lines[i].Points[1] = basis[i] * 3;
}
GlobalPosition = node25d.GlobalPosition;
spatialNode = node25d.GetChild<Spatial>(0);
spatialNode = node25d.GetChild<Node3D>(0);
}

View File

@@ -8,16 +8,16 @@ script = ExtResource( 1 )
[node name="Lines" type="Node2D" parent="."]
[node name="X" type="Line2D" parent="Lines"]
modulate = Color( 1, 1, 1, 0.8 )
points = PoolVector2Array( 0, 0, 100, 0 )
default_color = Color( 0.91, 0.273, 0, 1 )
modulate = Color(1, 1, 1, 0.8)
points = PackedVector2Array(0, 0, 100, 0)
default_color = Color(0.91, 0.273, 0, 1)
[node name="Y" type="Line2D" parent="Lines"]
modulate = Color( 1, 1, 1, 0.8 )
points = PoolVector2Array( 0, 0, 0, -100 )
default_color = Color( 0, 0.91, 0.273, 1 )
modulate = Color(1, 1, 1, 0.8)
points = PackedVector2Array(0, 0, 0, -100)
default_color = Color(0, 0.91, 0.273, 1)
[node name="Z" type="Line2D" parent="Lines"]
modulate = Color( 1, 1, 1, 0.8 )
points = PoolVector2Array( 0, 0, 0, 100 )
default_color = Color( 0.3, 0, 1, 1 )
modulate = Color(1, 1, 1, 0.8)
points = PackedVector2Array(0, 0, 0, 100)
default_color = Color(0.3, 0, 1, 1)

View File

@@ -19,19 +19,19 @@ __meta__ = {
}
[node name="TopBar" type="HBoxContainer" parent="."]
margin_right = 1600.0
margin_bottom = 32.0
rect_min_size = Vector2( 0, 32 )
offset_right = 1600.0
offset_bottom = 32.0
rect_min_size = Vector2(0, 32)
size_flags_horizontal = 3
[node name="ViewModeButtons" type="HBoxContainer" parent="TopBar"]
margin_right = 798.0
margin_bottom = 32.0
offset_right = 798.0
offset_bottom = 32.0
size_flags_horizontal = 3
[node name="45Degree" type="CheckBox" parent="TopBar/ViewModeButtons"]
margin_right = 94.0
margin_bottom = 32.0
offset_right = 94.0
offset_bottom = 32.0
pressed = true
group = ExtResource( 2 )
text = "45 Degree"
@@ -40,9 +40,9 @@ __meta__ = {
}
[node name="Isometric" type="CheckBox" parent="TopBar/ViewModeButtons"]
margin_left = 98.0
margin_right = 188.0
margin_bottom = 32.0
offset_left = 98.0
offset_right = 188.0
offset_bottom = 32.0
group = ExtResource( 2 )
text = "Isometric"
__meta__ = {
@@ -50,9 +50,9 @@ __meta__ = {
}
[node name="TopDown" type="CheckBox" parent="TopBar/ViewModeButtons"]
margin_left = 192.0
margin_right = 283.0
margin_bottom = 32.0
offset_left = 192.0
offset_right = 283.0
offset_bottom = 32.0
group = ExtResource( 2 )
text = "Top Down"
__meta__ = {
@@ -60,9 +60,9 @@ __meta__ = {
}
[node name="FrontSide" type="CheckBox" parent="TopBar/ViewModeButtons"]
margin_left = 287.0
margin_right = 379.0
margin_bottom = 32.0
offset_left = 287.0
offset_right = 379.0
offset_bottom = 32.0
group = ExtResource( 2 )
text = "Front Side"
__meta__ = {
@@ -70,9 +70,9 @@ __meta__ = {
}
[node name="ObliqueY" type="CheckBox" parent="TopBar/ViewModeButtons"]
margin_left = 383.0
margin_right = 473.0
margin_bottom = 32.0
offset_left = 383.0
offset_right = 473.0
offset_bottom = 32.0
group = ExtResource( 2 )
text = "Oblique Y"
__meta__ = {
@@ -80,9 +80,9 @@ __meta__ = {
}
[node name="ObliqueZ" type="CheckBox" parent="TopBar/ViewModeButtons"]
margin_left = 477.0
margin_right = 568.0
margin_bottom = 32.0
offset_left = 477.0
offset_right = 568.0
offset_bottom = 32.0
group = ExtResource( 2 )
text = "Oblique Z"
__meta__ = {
@@ -90,31 +90,31 @@ __meta__ = {
}
[node name="Zoom" type="HBoxContainer" parent="TopBar"]
margin_left = 802.0
margin_right = 1600.0
margin_bottom = 32.0
offset_left = 802.0
offset_right = 1600.0
offset_bottom = 32.0
size_flags_horizontal = 3
alignment = 2
[node name="ZoomOut" type="Button" parent="TopBar/Zoom"]
margin_left = 680.0
margin_right = 710.0
margin_bottom = 32.0
rect_min_size = Vector2( 30, 0 )
offset_left = 680.0
offset_right = 710.0
offset_bottom = 32.0
rect_min_size = Vector2(30, 0)
text = "-"
[node name="ZoomPercent" type="Label" parent="TopBar/Zoom"]
margin_left = 714.0
margin_top = 9.0
margin_right = 764.0
margin_bottom = 23.0
rect_min_size = Vector2( 50, 0 )
offset_left = 714.0
offset_top = 9.0
offset_right = 764.0
offset_bottom = 23.0
rect_min_size = Vector2(50, 0)
text = "100%"
align = 1
clip_text = true
[node name="ZoomReset" type="Button" parent="TopBar/Zoom/ZoomPercent"]
modulate = Color( 1, 1, 1, 0 )
modulate = Color(1, 1, 1, 0)
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
@@ -122,31 +122,31 @@ __meta__ = {
}
[node name="ZoomIn" type="Button" parent="TopBar/Zoom"]
margin_left = 768.0
margin_right = 798.0
margin_bottom = 32.0
rect_min_size = Vector2( 30, 0 )
offset_left = 768.0
offset_right = 798.0
offset_bottom = 32.0
rect_min_size = Vector2(30, 0)
text = "+"
[node name="Viewport25D" type="ColorRect" parent="."]
margin_top = 36.0
margin_right = 1600.0
margin_bottom = 900.0
offset_top = 36.0
offset_right = 1600.0
offset_bottom = 900.0
rect_clip_content = true
size_flags_horizontal = 3
size_flags_vertical = 3
color = Color( 0.301961, 0.301961, 0.301961, 1 )
color = Color(0.301961, 0.301961, 0.301961, 1)
script = ExtResource( 1 )
[node name="Viewport2D" type="Viewport" parent="Viewport25D"]
size = Vector2( 1600, 864 )
[node name="Viewport2D" type="SubViewport" parent="Viewport25D"]
size = Vector2(1600, 864)
transparent_bg = true
disable_3d = true
usage = 1
render_target_v_flip = true
[node name="ViewportOverlay" type="Viewport" parent="Viewport25D"]
size = Vector2( 1600, 864 )
[node name="ViewportOverlay" type="SubViewport" parent="Viewport25D"]
size = Vector2(1600, 864)
transparent_bg = true
disable_3d = true
usage = 1

View File

@@ -1,4 +1,4 @@
tool
@tool
extends Control
var zoom_level := 0
@@ -10,16 +10,16 @@ var view_mode_index := 0
var editor_interface: EditorInterface # Set in node25d_plugin.gd
var moving = false
onready var viewport_2d = $Viewport2D
onready var viewport_overlay = $ViewportOverlay
onready var view_mode_button_group: ButtonGroup = $"../TopBar/ViewModeButtons/45Degree".group
onready var zoom_label: Label = $"../TopBar/Zoom/ZoomPercent"
onready var gizmo_25d_scene = preload("res://addons/node25d-cs/main_screen/gizmo_25d.tscn")
@onready var viewport_2d = $Viewport2D
@onready var viewport_overlay = $ViewportOverlay
@onready var view_mode_button_group: ButtonGroup = $"../TopBar/ViewModeButtons/45Degree".group
@onready var zoom_label: Label = $"../TopBar/Zoom/ZoomPercent"
@onready var gizmo_25d_scene = preload("res://addons/node25d-cs/main_screen/gizmo_25d.tscn")
func _ready():
# Give Godot a chance to fully load the scene. Should take two frames.
yield(get_tree(), "idle_frame")
yield(get_tree(), "idle_frame")
await get_tree().process_frame
await get_tree().process_frame
var edited_scene_root = get_tree().edited_scene_root
if not edited_scene_root:
# Godot hasn't finished loading yet, so try loading the plugin again.
@@ -46,17 +46,17 @@ func _process(delta):
_recursive_change_view_mode(get_tree().edited_scene_root)
# Zooming.
if Input.is_mouse_button_pressed(BUTTON_WHEEL_UP):
if Input.is_mouse_button_pressed(MOUSE_BUTTON_WHEEL_UP):
zoom_level += 1
elif Input.is_mouse_button_pressed(BUTTON_WHEEL_DOWN):
elif Input.is_mouse_button_pressed(MOUSE_BUTTON_WHEEL_DOWN):
zoom_level -= 1
var zoom = _get_zoom_amount()
# Viewport size.
# SubViewport size.
var size = get_global_rect().size
viewport_2d.size = size
# Viewport transform.
# SubViewport transform.
var viewport_trans = Transform2D.IDENTITY
viewport_trans.x *= zoom
viewport_trans.y *= zoom
@@ -83,7 +83,7 @@ func _process(delta):
if selected == overlay_child.get("node25d"):
new = false
if new:
var gizmo = gizmo_25d_scene.instance()
var gizmo = gizmo_25d_scene.instantiate()
viewport_overlay.add_child(gizmo)
gizmo.set("node25d", selected)
gizmo.call("Initialize")
@@ -93,25 +93,25 @@ func _process(delta):
func _gui_input(event):
if event is InputEventMouseButton:
if event.is_pressed():
if event.button_index == BUTTON_WHEEL_UP:
if event.button_index == MOUSE_BUTTON_WHEEL_UP:
zoom_level += 1
accept_event()
elif event.button_index == BUTTON_WHEEL_DOWN:
elif event.button_index == MOUSE_BUTTON_WHEEL_DOWN:
zoom_level -= 1
accept_event()
elif event.button_index == BUTTON_MIDDLE:
elif event.button_index == MOUSE_BUTTON_MIDDLE:
is_panning = true
pan_center = viewport_center - event.position
accept_event()
elif event.button_index == BUTTON_LEFT:
elif event.button_index == MOUSE_BUTTON_LEFT:
var overlay_children = viewport_overlay.get_children()
for overlay_child in overlay_children:
overlay_child.set("wantsToMove", true)
accept_event()
elif event.button_index == BUTTON_MIDDLE:
elif event.button_index == MOUSE_BUTTON_MIDDLE:
is_panning = false
accept_event()
elif event.button_index == BUTTON_LEFT:
elif event.button_index == MOUSE_BUTTON_LEFT:
var overlay_children = viewport_overlay.get_children()
for overlay_child in overlay_children:
overlay_child.set("wantsToMove", false)

View File

@@ -1,4 +1,4 @@
tool
@tool
extends EditorPlugin
const MainPanel = preload("res://addons/node25d-cs/main_screen/main_screen_25d.tscn")
@@ -6,7 +6,7 @@ const MainPanel = preload("res://addons/node25d-cs/main_screen/main_screen_25d.t
var main_panel_instance
func _enter_tree():
main_panel_instance = MainPanel.instance()
main_panel_instance = MainPanel.instantiate()
#main_panel_instance.get_child(1).set("editorInterface", get_editor_interface()) # For C#
main_panel_instance.get_child(1).editor_interface = get_editor_interface()
@@ -19,7 +19,7 @@ func _enter_tree():
# When this plugin node enters tree, add the custom types.
add_custom_type("Node25D", "Node2D", preload("Node25D.cs"), preload("icons/node_25d_icon.png"))
add_custom_type("YSort25D", "Node", preload("YSort25D.cs"), preload("icons/y_sort_25d_icon.png"))
add_custom_type("ShadowMath25D", "KinematicBody", preload("ShadowMath25D.cs"), preload("icons/shadow_math_25d_icon.png"))
add_custom_type("ShadowMath25D", "CharacterBody3D", preload("ShadowMath25D.cs"), preload("icons/shadow_math_25d_icon.png"))
func _exit_tree():

View File

@@ -1,13 +1,13 @@
using Godot;
public class CubeMath : Spatial
public partial class CubeMath : Node3D
{
private static PackedScene cubePointScene = ResourceLoader.Load<PackedScene>("res://assets/cube/cube_point.tscn");
private bool _isParentReady = false;
private Node2D _parent;
private Spatial[] _cubePointsMath = new Spatial[27]; // The math node of each 2.5D cube point
private Spatial[] _cubeMathSpatials = new Spatial[27]; // The CubeMath children that find position.
private Node3D[] _cubePointsMath = new Node3D[27]; // The math node of each 2.5D cube point
private Node3D[] _cubeMathSpatials = new Node3D[27]; // The CubeMath children that find position.
public override void _Ready()
{
@@ -21,8 +21,8 @@ public class CubeMath : Spatial
int c = (i % 3) - 1;
Vector3 spatialPosition = 5 * (a * Vector3.Right + b * Vector3.Up + c * Vector3.Back);
_cubeMathSpatials[i] = new Spatial();
_cubeMathSpatials[i].Translation = spatialPosition;
_cubeMathSpatials[i] = new Node3D();
_cubeMathSpatials[i].Position = spatialPosition;
_cubeMathSpatials[i].Name = "CubeMath #" + i + ", " + a + " " + b + " " + c;
AddChild(_cubeMathSpatials[i]);
}
@@ -48,7 +48,7 @@ public class CubeMath : Spatial
RotateZ(delta * (Input.GetActionStrength("move_counterclockwise") - Input.GetActionStrength("move_clockwise")));
if (Input.IsActionJustPressed("reset_position"))
{
Transform = Transform.Identity;
Transform = Transform3D.Identity;
}
for (int i = 0; i < 27; i++)
{
@@ -61,9 +61,9 @@ public class CubeMath : Spatial
for (int i = 0; i < 27; i++)
{
PackedScene myCubePointScene = cubePointScene.Duplicate(true) as PackedScene;
Node25D cubePoint = myCubePointScene.Instance() as Node25D;
Node25D cubePoint = myCubePointScene.Instantiate() as Node25D;
cubePoint.Name = "CubePoint #" + i;
_cubePointsMath[i] = cubePoint.GetChild<Spatial>(0);
_cubePointsMath[i] = cubePoint.GetChild<Node3D>(0);
_parent.AddChild(cubePoint);
}
_isParentReady = true;

View File

@@ -11,7 +11,7 @@
[node name="Camera2D" type="Camera2D" parent="."]
current = true
[node name="CubeMath" type="Spatial" parent="."]
[node name="CubeMath" type="Node3D" parent="."]
script = ExtResource( 4 )
[node name="YSort25D" type="Node" parent="."]

View File

@@ -1,17 +1,17 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://addons/node25d-cs/Node25D.cs" type="Script" id=1]
[ext_resource path="res://addons/node25d-cs/icons/node_25d_icon.png" type="Texture" id=2]
[ext_resource path="res://assets/cube/godot.png" type="Texture" id=3]
[ext_resource path="res://addons/node25d-cs/icons/node_25d_icon.png" type="Texture2D" id=2]
[ext_resource path="res://assets/cube/godot.png" type="Texture2D" id=3]
[node name="CubePoint" type="Node2D"]
script = ExtResource( 1 )
__meta__ = {
"_editor_icon": ExtResource( 2 )
}
spatialPosition = Vector3( 0, 0, 0 )
spatialPosition = Vector3(0, 0, 0)
[node name="CubePointMath" type="Spatial" parent="."]
[node name="CubePointMath" type="Node3D" parent="."]
[node name="CubePointSprite" type="Sprite" parent="."]
[node name="CubePointSprite" type="Sprite2D" parent="."]
texture = ExtResource( 3 )

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/godot.png-a942b208c71d1b44958f34d302d011ec.stex"
type="StreamTexture2D"
path="res://.godot/imported/godot.png-a942b208c71d1b44958f34d302d011ec.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://assets/cube/godot.png"
dest_files=[ "res://.import/godot.png-a942b208c71d1b44958f34d302d011ec.stex" ]
dest_files=["res://.godot/imported/godot.png-a942b208c71d1b44958f34d302d011ec.stex"]
[params]

View File

@@ -6,21 +6,21 @@
[ext_resource path="res://assets/player/player_25d.tscn" type="PackedScene" id=4]
[ext_resource path="res://assets/shadow/shadow_25d.tscn" type="PackedScene" id=5]
[ext_resource path="res://addons/node25d-cs/Node25D.cs" type="Script" id=6]
[ext_resource path="res://addons/node25d-cs/icons/node_25d_icon.png" type="Texture" id=7]
[ext_resource path="res://assets/platform/textures/forty_five.png" type="Texture" id=8]
[ext_resource path="res://addons/node25d-cs/icons/node_25d_icon.png" type="Texture2D" id=7]
[ext_resource path="res://assets/platform/textures/forty_five.png" type="Texture2D" id=8]
[ext_resource path="res://assets/platform/platform_sprite.gd" type="Script" id=9]
[sub_resource type="BoxShape" id=1]
extents = Vector3( 5, 0.5, 5 )
[sub_resource type="BoxShape3D" id=1]
extents = Vector3(5, 0.5, 5)
[sub_resource type="BoxShape" id=2]
extents = Vector3( 5, 0.5, 5 )
[sub_resource type="BoxShape3D" id=2]
extents = Vector3(5, 0.5, 5)
[sub_resource type="BoxShape" id=3]
extents = Vector3( 5, 0.5, 5 )
[sub_resource type="BoxShape3D" id=3]
extents = Vector3(5, 0.5, 5)
[sub_resource type="BoxShape" id=4]
extents = Vector3( 5, 0.5, 5 )
[sub_resource type="BoxShape3D" id=4]
extents = Vector3(5, 0.5, 5)
[node name="DemoScene" type="Node2D"]
@@ -31,582 +31,582 @@ z_index = -3952
[node name="Shadow25D" parent="." instance=ExtResource( 5 )]
visible = true
position = Vector2( 1.00261e-06, 11.2685 )
position = Vector2(1.00261e-06, 11.2685)
z_index = -3958
spatialPosition = Vector3( 3.13315e-08, -0.498, 3.13315e-08 )
spatialPosition = Vector3(3.13315e-08, -0.498, 3.13315e-08)
[node name="Platform0" type="Node2D" parent="."]
position = Vector2( -256, -113.137 )
position = Vector2(-256, -113.137)
z_index = -3954
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( -8, 5, 0 )
spatialPosition = Vector3(-8, 5, 0)
[node name="PlatformMath" type="StaticBody" parent="Platform0"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -8, 5, 0 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8, 5, 0)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform0/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform0/PlatformMath"]
shape = SubResource( 1 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform0"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform0"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform1" type="Node2D" parent="."]
position = Vector2( -256, -339.411 )
position = Vector2(-256, -339.411)
z_index = -3956
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( -8, 5, -10 )
spatialPosition = Vector3(-8, 5, -10)
[node name="PlatformMath" type="StaticBody" parent="Platform1"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -8, 5, -10 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform1"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8, 5, -10)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform1/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform1/PlatformMath"]
shape = SubResource( 2 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform1"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform1"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform2" type="Node2D" parent="."]
position = Vector2( 0, 22.6274 )
position = Vector2(0, 22.6274)
z_index = -3962
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( 0, -1, 0 )
spatialPosition = Vector3(0, -1, 0)
[node name="PlatformMath" type="StaticBody" parent="Platform2"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform2/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform2/PlatformMath"]
shape = SubResource( 2 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform2"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform2"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform3" type="Node2D" parent="."]
position = Vector2( 320, 22.6274 )
position = Vector2(320, 22.6274)
z_index = -3960
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( 10, -1, 0 )
spatialPosition = Vector3(10, -1, 0)
[node name="PlatformMath" type="StaticBody" parent="Platform3"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 10, -1, 0 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform3"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, -1, 0)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform3/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform3/PlatformMath"]
shape = SubResource( 2 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform3"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform3"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform4" type="Node2D" parent="."]
position = Vector2( 0, -203.647 )
position = Vector2(0, -203.647)
z_index = -3966
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( 0, -1, -10 )
spatialPosition = Vector3(0, -1, -10)
[node name="PlatformMath" type="StaticBody" parent="Platform4"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, -10 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform4"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, -10)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform4/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform4/PlatformMath"]
shape = SubResource( 2 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform4"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform4"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform5" type="Node2D" parent="."]
position = Vector2( 320, -113.137 )
position = Vector2(320, -113.137)
z_index = -3984
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( 10, -5, -10 )
spatialPosition = Vector3(10, -5, -10)
[node name="PlatformMath" type="StaticBody" parent="Platform5"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 10, -5, -10 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform5"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, -5, -10)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform5/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform5/PlatformMath"]
shape = SubResource( 2 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform5"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform5"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform6" type="Node2D" parent="."]
position = Vector2( 320, 113.137 )
position = Vector2(320, 113.137)
z_index = -3980
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( 10, -5, 0 )
spatialPosition = Vector3(10, -5, 0)
[node name="PlatformMath" type="StaticBody" parent="Platform6"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 10, -5, 0 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform6"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, -5, 0)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform6/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform6/PlatformMath"]
shape = SubResource( 2 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform6"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform6"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform7" type="Node2D" parent="."]
position = Vector2( 320, 339.411 )
position = Vector2(320, 339.411)
z_index = -3978
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( 10, -5, 10 )
spatialPosition = Vector3(10, -5, 10)
[node name="PlatformMath" type="StaticBody" parent="Platform7"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 10, -5, 10 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform7"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, -5, 10)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform7/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform7/PlatformMath"]
shape = SubResource( 3 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform7"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform7"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform8" type="Node2D" parent="."]
position = Vector2( 320, 565.685 )
position = Vector2(320, 565.685)
z_index = -3976
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( 10, -5, 20 )
spatialPosition = Vector3(10, -5, 20)
[node name="PlatformMath" type="StaticBody" parent="Platform8"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 10, -5, 20 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform8"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, -5, 20)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform8/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform8/PlatformMath"]
shape = SubResource( 3 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform8"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform8"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform21" type="Node2D" parent="."]
position = Vector2( 320, 791.96 )
position = Vector2(320, 791.96)
z_index = -3972
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( 10, -5, 30 )
spatialPosition = Vector3(10, -5, 30)
[node name="PlatformMath" type="StaticBody" parent="Platform21"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 10, -5, 30 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform21"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, -5, 30)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform21/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform21/PlatformMath"]
shape = SubResource( 3 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform21"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform21"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform22" type="Node2D" parent="."]
position = Vector2( 320, 1018.23 )
position = Vector2(320, 1018.23)
z_index = -3970
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( 10, -5, 40 )
spatialPosition = Vector3(10, -5, 40)
[node name="PlatformMath" type="StaticBody" parent="Platform22"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 10, -5, 40 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform22"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, -5, 40)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform22/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform22/PlatformMath"]
shape = SubResource( 3 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform22"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform22"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform9" type="Node2D" parent="."]
position = Vector2( 640, 339.411 )
position = Vector2(640, 339.411)
z_index = -3974
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( 20, -5, 10 )
spatialPosition = Vector3(20, -5, 10)
[node name="PlatformMath" type="StaticBody" parent="Platform9"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 20, -5, 10 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform9"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 20, -5, 10)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform9/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform9/PlatformMath"]
shape = SubResource( 4 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform9"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform9"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform10" type="Node2D" parent="."]
position = Vector2( 896, 294.156 )
position = Vector2(896, 294.156)
z_index = -3994
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( 28, -10, 3 )
spatialPosition = Vector3(28, -10, 3)
[node name="PlatformMath" type="StaticBody" parent="Platform10"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 28, -10, 3 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform10"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 28, -10, 3)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform10/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform10/PlatformMath"]
shape = SubResource( 4 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform10"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform10"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform11" type="Node2D" parent="."]
position = Vector2( 896, 520.431 )
position = Vector2(896, 520.431)
z_index = -3990
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( 28, -10, 13 )
spatialPosition = Vector3(28, -10, 13)
[node name="PlatformMath" type="StaticBody" parent="Platform11"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 28, -10, 13 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform11"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 28, -10, 13)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform11/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform11/PlatformMath"]
shape = SubResource( 4 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform11"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform11"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform12" type="Node2D" parent="."]
position = Vector2( 896, 746.705 )
position = Vector2(896, 746.705)
z_index = -3988
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( 28, -10, 23 )
spatialPosition = Vector3(28, -10, 23)
[node name="PlatformMath" type="StaticBody" parent="Platform12"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 28, -10, 23 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform12"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 28, -10, 23)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform12/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform12/PlatformMath"]
shape = SubResource( 4 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform12"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform12"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform13" type="Node2D" parent="."]
position = Vector2( 576, 746.705 )
position = Vector2(576, 746.705)
z_index = -3992
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( 18, -10, 23 )
spatialPosition = Vector3(18, -10, 23)
[node name="PlatformMath" type="StaticBody" parent="Platform13"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 18, -10, 23 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform13"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18, -10, 23)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform13/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform13/PlatformMath"]
shape = SubResource( 4 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform13"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform13"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform14" type="Node2D" parent="."]
position = Vector2( 256, 746.705 )
position = Vector2(256, 746.705)
z_index = -3996
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( 8, -10, 23 )
spatialPosition = Vector3(8, -10, 23)
[node name="PlatformMath" type="StaticBody" parent="Platform14"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 8, -10, 23 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform14"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8, -10, 23)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform14/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform14/PlatformMath"]
shape = SubResource( 4 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform14"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform14"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform15" type="Node2D" parent="."]
position = Vector2( -64, 746.705 )
position = Vector2(-64, 746.705)
z_index = -3998
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( -2, -10, 23 )
spatialPosition = Vector3(-2, -10, 23)
[node name="PlatformMath" type="StaticBody" parent="Platform15"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2, -10, 23 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform15"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, -10, 23)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform15/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform15/PlatformMath"]
shape = SubResource( 4 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform15"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform15"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform23" type="Node2D" parent="."]
position = Vector2( -384, 746.705 )
position = Vector2(-384, 746.705)
z_index = -4000
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( -12, -10, 23 )
spatialPosition = Vector3(-12, -10, 23)
[node name="PlatformMath" type="StaticBody" parent="Platform23"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -12, -10, 23 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform23"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -12, -10, 23)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform23/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform23/PlatformMath"]
shape = SubResource( 4 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform23"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform23"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform16" type="Node2D" parent="."]
position = Vector2( -320, 565.685 )
position = Vector2(-320, 565.685)
z_index = -3982
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( -10, -5, 20 )
spatialPosition = Vector3(-10, -5, 20)
[node name="PlatformMath" type="StaticBody" parent="Platform16"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -10, -5, 20 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform16"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, -5, 20)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform16/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform16/PlatformMath"]
shape = SubResource( 4 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform16"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform16"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform19" type="Node2D" parent="."]
position = Vector2( -320, 339.411 )
position = Vector2(-320, 339.411)
z_index = -3986
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( -10, -5, 10 )
spatialPosition = Vector3(-10, -5, 10)
[node name="PlatformMath" type="StaticBody" parent="Platform19"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -10, -5, 10 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform19"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, -5, 10)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform19/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform19/PlatformMath"]
shape = SubResource( 4 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform19"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform19"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform17" type="Node2D" parent="."]
position = Vector2( -480, 248.902 )
position = Vector2(-480, 248.902)
z_index = -3964
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( -15, -1, 10 )
spatialPosition = Vector3(-15, -1, 10)
[node name="PlatformMath" type="StaticBody" parent="Platform17"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -15, -1, 10 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform17"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -15, -1, 10)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform17/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform17/PlatformMath"]
shape = SubResource( 4 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform17"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform17"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="Platform18" type="Node2D" parent="."]
position = Vector2( -480, 22.6274 )
position = Vector2(-480, 22.6274)
z_index = -3968
script = ExtResource( 6 )
__meta__ = {
"_editor_icon": ExtResource( 7 )
}
spatialPosition = Vector3( -15, -1, 0 )
spatialPosition = Vector3(-15, -1, 0)
[node name="PlatformMath" type="StaticBody" parent="Platform18"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -15, -1, 0 )
[node name="PlatformMath" type="StaticBody3D" parent="Platform18"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -15, -1, 0)
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="Platform18/PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform18/PlatformMath"]
shape = SubResource( 4 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="Platform18"]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="Platform18"]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 8 )
script = ExtResource( 9 )

View File

@@ -2,12 +2,12 @@
importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/mr_mrs_robot.ogg-04d8a930124c76b878f30fed4f47903c.oggstr"
path="res://.godot/imported/mr_mrs_robot.ogg-04d8a930124c76b878f30fed4f47903c.oggstr"
[deps]
source_file="res://assets/mr_mrs_robot.ogg"
dest_files=[ "res://.import/mr_mrs_robot.ogg-04d8a930124c76b878f30fed4f47903c.oggstr" ]
dest_files=["res://.godot/imported/mr_mrs_robot.ogg-04d8a930124c76b878f30fed4f47903c.oggstr"]
[params]

View File

@@ -1,12 +1,12 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://addons/node25d-cs/Node25D.cs" type="Script" id=1]
[ext_resource path="res://addons/node25d-cs/icons/node_25d_icon.png" type="Texture" id=2]
[ext_resource path="res://assets/platform/textures/forty_five.png" type="Texture" id=3]
[ext_resource path="res://addons/node25d-cs/icons/node_25d_icon.png" type="Texture2D" id=2]
[ext_resource path="res://assets/platform/textures/forty_five.png" type="Texture2D" id=3]
[ext_resource path="res://assets/platform/platform_sprite.gd" type="Script" id=4]
[sub_resource type="BoxShape" id=1]
extents = Vector3( 5, 0.5, 5 )
[sub_resource type="BoxShape3D" id=1]
extents = Vector3(5, 0.5, 5)
[node name="Platform" type="Node2D"]
z_index = -3954
@@ -14,19 +14,19 @@ script = ExtResource( 1 )
__meta__ = {
"_editor_icon": ExtResource( 2 )
}
spatialPosition = Vector3( 0, 0, 0 )
spatialPosition = Vector3(0, 0, 0)
[node name="PlatformMath" type="StaticBody" parent="."]
[node name="PlatformMath" type="StaticBody3D" parent="."]
collision_layer = 1048575
collision_mask = 1048575
[node name="CollisionShape" type="CollisionShape" parent="PlatformMath"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="PlatformMath"]
shape = SubResource( 1 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlatformSprite" type="Sprite" parent="."]
scale = Vector2( 0.5, 0.5 )
[node name="PlatformSprite" type="Sprite2D" parent="."]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 3 )
script = ExtResource( 4 )

View File

@@ -1,12 +1,12 @@
tool
extends Sprite
@tool
extends Sprite2D
onready var _forty_five = preload("res://assets/platform/textures/forty_five.png")
onready var _isometric = preload("res://assets/platform/textures/isometric.png")
onready var _top_down = preload("res://assets/platform/textures/top_down.png")
onready var _front_side = preload("res://assets/platform/textures/front_side.png")
onready var _oblique_y = preload("res://assets/platform/textures/oblique_y.png")
onready var _oblique_z = preload("res://assets/platform/textures/oblique_z.png")
@onready var _forty_five = preload("res://assets/platform/textures/forty_five.png")
@onready var _isometric = preload("res://assets/platform/textures/isometric.png")
@onready var _top_down = preload("res://assets/platform/textures/top_down.png")
@onready var _front_side = preload("res://assets/platform/textures/front_side.png")
@onready var _oblique_y = preload("res://assets/platform/textures/oblique_y.png")
@onready var _oblique_z = preload("res://assets/platform/textures/oblique_z.png")
func _process(_delta):
if not Engine.editor_hint:

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/forty_five.png-d90cd8ed1241c4a5270d87a83aafe24d.stex"
type="StreamTexture2D"
path="res://.godot/imported/forty_five.png-d90cd8ed1241c4a5270d87a83aafe24d.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://assets/platform/textures/forty_five.png"
dest_files=[ "res://.import/forty_five.png-d90cd8ed1241c4a5270d87a83aafe24d.stex" ]
dest_files=["res://.godot/imported/forty_five.png-d90cd8ed1241c4a5270d87a83aafe24d.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/front_side.png-057b43bb7270572907c729580068368b.stex"
type="StreamTexture2D"
path="res://.godot/imported/front_side.png-057b43bb7270572907c729580068368b.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://assets/platform/textures/front_side.png"
dest_files=[ "res://.import/front_side.png-057b43bb7270572907c729580068368b.stex" ]
dest_files=["res://.godot/imported/front_side.png-057b43bb7270572907c729580068368b.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/isometric.png-364f65b60f600b10cfb048c20ea82124.stex"
type="StreamTexture2D"
path="res://.godot/imported/isometric.png-364f65b60f600b10cfb048c20ea82124.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://assets/platform/textures/isometric.png"
dest_files=[ "res://.import/isometric.png-364f65b60f600b10cfb048c20ea82124.stex" ]
dest_files=["res://.godot/imported/isometric.png-364f65b60f600b10cfb048c20ea82124.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/oblique_y.png-ed89b3ef35707993300443a84f7ebbd1.stex"
type="StreamTexture2D"
path="res://.godot/imported/oblique_y.png-ed89b3ef35707993300443a84f7ebbd1.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://assets/platform/textures/oblique_y.png"
dest_files=[ "res://.import/oblique_y.png-ed89b3ef35707993300443a84f7ebbd1.stex" ]
dest_files=["res://.godot/imported/oblique_y.png-ed89b3ef35707993300443a84f7ebbd1.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/oblique_z.png-270f041a55370c5ba68850a072597e97.stex"
type="StreamTexture2D"
path="res://.godot/imported/oblique_z.png-270f041a55370c5ba68850a072597e97.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://assets/platform/textures/oblique_z.png"
dest_files=[ "res://.import/oblique_z.png-270f041a55370c5ba68850a072597e97.stex" ]
dest_files=["res://.godot/imported/oblique_z.png-270f041a55370c5ba68850a072597e97.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/top_down.png-3df3f4c204d6337fdc9aa208196ed940.stex"
type="StreamTexture2D"
path="res://.godot/imported/top_down.png-3df3f4c204d6337fdc9aa208196ed940.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://assets/platform/textures/top_down.png"
dest_files=[ "res://.import/top_down.png-3df3f4c204d6337fdc9aa208196ed940.stex" ]
dest_files=["res://.godot/imported/top_down.png-3df3f4c204d6337fdc9aa208196ed940.stex"]
[params]

View File

@@ -6,9 +6,9 @@ using real_t = System.Single;
#endif
/// <summary>
/// Handles Player-specific behavior like moving. We calculate such things with KinematicBody.
/// Handles Player-specific behavior like moving. We calculate such things with CharacterBody3D.
/// </summary>
public class PlayerMath25D : KinematicBody
public partial class PlayerMath25D : CharacterBody3D
{
private Node25D _parent;
public real_t verticalSpeed = 0;
@@ -39,7 +39,7 @@ public class PlayerMath25D : KinematicBody
if (Input.IsActionPressed("reset_position"))
{
Transform = new Transform(Basis.Identity, Vector3.Up * 10);
Transform = new Transform3D(Basis.Identity, Vector3.Up * 10);
verticalSpeed = 0;
}
else

View File

@@ -6,11 +6,11 @@ using real_t = System.Single;
#endif
[Tool]
public class PlayerSprite : Sprite
public partial class PlayerSprite : Sprite2D
{
private static Texture _stand = ResourceLoader.Load<Texture>("res://assets/player/textures/stand.png");
private static Texture _jump = ResourceLoader.Load<Texture>("res://assets/player/textures/jump.png");
private static Texture _run = ResourceLoader.Load<Texture>("res://assets/player/textures/run.png");
private static Texture2D _stand = ResourceLoader.Load<Texture2D>("res://assets/player/textures/stand.png");
private static Texture2D _jump = ResourceLoader.Load<Texture2D>("res://assets/player/textures/jump.png");
private static Texture2D _run = ResourceLoader.Load<Texture2D>("res://assets/player/textures/run.png");
private const int FRAMERATE = 15;
private int _direction;

View File

@@ -1,35 +1,35 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://addons/node25d-cs/Node25D.cs" type="Script" id=1]
[ext_resource path="res://addons/node25d-cs/icons/node_25d_icon.png" type="Texture" id=2]
[ext_resource path="res://addons/node25d-cs/icons/node_25d_icon.png" type="Texture2D" id=2]
[ext_resource path="res://assets/player/PlayerMath25D.cs" type="Script" id=3]
[ext_resource path="res://assets/player/textures/stand.png" type="Texture" id=4]
[ext_resource path="res://assets/player/textures/stand.png" type="Texture2D" id=4]
[ext_resource path="res://assets/player/PlayerSprite.cs" type="Script" id=5]
[sub_resource type="BoxShape" id=1]
extents = Vector3( 0.5, 1, 0.5 )
[sub_resource type="BoxShape3D" id=1]
extents = Vector3(0.5, 1, 0.5)
[node name="Player25D" type="Node2D"]
position = Vector2( 0, -226.274 )
position = Vector2(0, -226.274)
z_index = 100
script = ExtResource( 1 )
__meta__ = {
"_editor_icon": ExtResource( 2 )
}
spatialPosition = Vector3( 0, 10, 0 )
spatialPosition = Vector3(0, 10, 0)
[node name="PlayerMath25D" type="KinematicBody" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10, 0 )
[node name="PlayerMath25D" type="CharacterBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10, 0)
script = ExtResource( 3 )
[node name="CollisionShape" type="CollisionShape" parent="PlayerMath25D"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="PlayerMath25D"]
shape = SubResource( 1 )
__meta__ = {
"_edit_lock_": true
}
[node name="PlayerSprite" type="Sprite" parent="."]
scale = Vector2( 1, 0.75 )
[node name="PlayerSprite" type="Sprite2D" parent="."]
scale = Vector2(1, 0.75)
z_index = 1
texture = ExtResource( 4 )
vframes = 5

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/jump.png-ee91d86ec39d8c1dde239a382e843e86.stex"
type="StreamTexture2D"
path="res://.godot/imported/jump.png-ee91d86ec39d8c1dde239a382e843e86.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://assets/player/textures/jump.png"
dest_files=[ "res://.import/jump.png-ee91d86ec39d8c1dde239a382e843e86.stex" ]
dest_files=["res://.godot/imported/jump.png-ee91d86ec39d8c1dde239a382e843e86.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/run.png-6110949046e0632be1a9b1c8ac504217.stex"
type="StreamTexture2D"
path="res://.godot/imported/run.png-6110949046e0632be1a9b1c8ac504217.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://assets/player/textures/run.png"
dest_files=[ "res://.import/run.png-6110949046e0632be1a9b1c8ac504217.stex" ]
dest_files=["res://.godot/imported/run.png-6110949046e0632be1a9b1c8ac504217.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/stand.png-4d65e60dbd5f40d1f70da6aa2507ebe3.stex"
type="StreamTexture2D"
path="res://.godot/imported/stand.png-4d65e60dbd5f40d1f70da6aa2507ebe3.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://assets/player/textures/stand.png"
dest_files=[ "res://.import/stand.png-4d65e60dbd5f40d1f70da6aa2507ebe3.stex" ]
dest_files=["res://.godot/imported/stand.png-4d65e60dbd5f40d1f70da6aa2507ebe3.stex"]
[params]

View File

@@ -1,14 +1,14 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://addons/node25d-cs/Node25D.cs" type="Script" id=1]
[ext_resource path="res://addons/node25d-cs/icons/node_25d_icon.png" type="Texture" id=2]
[ext_resource path="res://addons/node25d-cs/icons/node_25d_icon.png" type="Texture2D" id=2]
[ext_resource path="res://addons/node25d-cs/ShadowMath25D.cs" type="Script" id=3]
[ext_resource path="res://addons/node25d-cs/icons/shadow_math_25d_icon.png" type="Texture" id=4]
[ext_resource path="res://assets/shadow/textures/forty_five.png" type="Texture" id=5]
[ext_resource path="res://addons/node25d-cs/icons/shadow_math_25d_icon.png" type="Texture2D" id=4]
[ext_resource path="res://assets/shadow/textures/forty_five.png" type="Texture2D" id=5]
[ext_resource path="res://assets/shadow/shadow_sprite.gd" type="Script" id=6]
[sub_resource type="BoxShape" id=1]
extents = Vector3( 0.5, 0.001, 0.5 )
[sub_resource type="BoxShape3D" id=1]
extents = Vector3(0.5, 0.001, 0.5)
[node name="Shadow25D" type="Node2D"]
visible = false
@@ -16,10 +16,10 @@ script = ExtResource( 1 )
__meta__ = {
"_editor_icon": ExtResource( 2 )
}
spatialPosition = Vector3( 0, 10, 0 )
spatialPosition = Vector3(0, 10, 0)
[node name="ShadowMath25D" type="KinematicBody" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10, 0 )
[node name="ShadowMath25D" type="CharacterBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10, 0)
collision_layer = 16
collision_mask = 16
script = ExtResource( 3 )
@@ -27,13 +27,13 @@ __meta__ = {
"_editor_icon": ExtResource( 4 )
}
[node name="CollisionShape" type="CollisionShape" parent="ShadowMath25D"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="ShadowMath25D"]
shape = SubResource( 1 )
__meta__ = {
"_edit_lock_": true
}
[node name="ShadowSprite" type="Sprite" parent="."]
scale = Vector2( 0.5, 0.5 )
[node name="ShadowSprite" type="Sprite2D" parent="."]
scale = Vector2(0.5, 0.5)
texture = ExtResource( 5 )
script = ExtResource( 6 )

View File

@@ -1,12 +1,12 @@
tool
extends Sprite
@tool
extends Sprite2D
onready var _forty_five = preload("res://assets/shadow/textures/forty_five.png")
onready var _isometric = preload("res://assets/shadow/textures/isometric.png")
onready var _top_down = preload("res://assets/shadow/textures/top_down.png")
onready var _front_side = preload("res://assets/shadow/textures/front_side.png")
onready var _oblique_y = preload("res://assets/shadow/textures/oblique_y.png")
onready var _oblique_z = preload("res://assets/shadow/textures/oblique_z.png")
@onready var _forty_five = preload("res://assets/shadow/textures/forty_five.png")
@onready var _isometric = preload("res://assets/shadow/textures/isometric.png")
@onready var _top_down = preload("res://assets/shadow/textures/top_down.png")
@onready var _front_side = preload("res://assets/shadow/textures/front_side.png")
@onready var _oblique_y = preload("res://assets/shadow/textures/oblique_y.png")
@onready var _oblique_z = preload("res://assets/shadow/textures/oblique_z.png")
func _process(_delta):
if not Engine.editor_hint:

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/forty_five.png-22dcfa54db51531b3612f686997a3fbe.stex"
type="StreamTexture2D"
path="res://.godot/imported/forty_five.png-22dcfa54db51531b3612f686997a3fbe.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://assets/shadow/textures/forty_five.png"
dest_files=[ "res://.import/forty_five.png-22dcfa54db51531b3612f686997a3fbe.stex" ]
dest_files=["res://.godot/imported/forty_five.png-22dcfa54db51531b3612f686997a3fbe.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/front_side.png-1470842d27848ecf4de63924b0b98f42.stex"
type="StreamTexture2D"
path="res://.godot/imported/front_side.png-1470842d27848ecf4de63924b0b98f42.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://assets/shadow/textures/front_side.png"
dest_files=[ "res://.import/front_side.png-1470842d27848ecf4de63924b0b98f42.stex" ]
dest_files=["res://.godot/imported/front_side.png-1470842d27848ecf4de63924b0b98f42.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/isometric.png-1a91c869806816b66a8fb886d4801f31.stex"
type="StreamTexture2D"
path="res://.godot/imported/isometric.png-1a91c869806816b66a8fb886d4801f31.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://assets/shadow/textures/isometric.png"
dest_files=[ "res://.import/isometric.png-1a91c869806816b66a8fb886d4801f31.stex" ]
dest_files=["res://.godot/imported/isometric.png-1a91c869806816b66a8fb886d4801f31.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/oblique_y.png-47d60a179a2cdeff15364f0e389e6008.stex"
type="StreamTexture2D"
path="res://.godot/imported/oblique_y.png-47d60a179a2cdeff15364f0e389e6008.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://assets/shadow/textures/oblique_y.png"
dest_files=[ "res://.import/oblique_y.png-47d60a179a2cdeff15364f0e389e6008.stex" ]
dest_files=["res://.godot/imported/oblique_y.png-47d60a179a2cdeff15364f0e389e6008.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/oblique_z.png-d8378bf8b95f890e76162d62a82022de.stex"
type="StreamTexture2D"
path="res://.godot/imported/oblique_z.png-d8378bf8b95f890e76162d62a82022de.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://assets/shadow/textures/oblique_z.png"
dest_files=[ "res://.import/oblique_z.png-d8378bf8b95f890e76162d62a82022de.stex" ]
dest_files=["res://.godot/imported/oblique_z.png-d8378bf8b95f890e76162d62a82022de.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/top_down.png-a3a98721249636eff54d8113d6075229.stex"
type="StreamTexture2D"
path="res://.godot/imported/top_down.png-a3a98721249636eff54d8113d6075229.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://assets/shadow/textures/top_down.png"
dest_files=[ "res://.import/top_down.png-a3a98721249636eff54d8113d6075229.stex" ]
dest_files=["res://.godot/imported/top_down.png-a3a98721249636eff54d8113d6075229.stex"]
[params]

View File

@@ -6,15 +6,15 @@
[node name="ControlHints" type="CenterContainer" parent="."]
anchor_right = 1.0
margin_bottom = 200.0
offset_bottom = 200.0
script = ExtResource( 1 )
[node name="Label" type="Label" parent="ControlHints"]
margin_left = 348.0
margin_top = 25.0
margin_right = 1251.0
margin_bottom = 175.0
rect_min_size = Vector2( 500, 50 )
offset_left = 348.0
offset_top = 25.0
offset_right = 1251.0
offset_bottom = 175.0
rect_min_size = Vector2(500, 50)
text = "
Controls: WASD to move, Space to jump, R to reset, Shift to walk, T to toggle isometric controls, C to view cube demo, Tab to toggle hints.

View File

@@ -6,15 +6,15 @@
[node name="ControlHints" type="CenterContainer" parent="."]
anchor_right = 1.0
margin_bottom = 200.0
offset_bottom = 200.0
script = ExtResource( 1 )
[node name="Label" type="Label" parent="ControlHints"]
margin_left = 416.0
margin_top = 25.0
margin_right = 1183.0
margin_bottom = 175.0
rect_min_size = Vector2( 500, 50 )
offset_left = 416.0
offset_top = 25.0
offset_right = 1183.0
offset_bottom = 175.0
rect_min_size = Vector2(500, 50)
text = "
Controls: WASDQE to rotate, R to reset, C to return to the world, Tab to toggle hints.

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
type="StreamTexture2D"
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://icon.png"
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"]
[params]

View File

@@ -24,141 +24,141 @@ window/size/height=900
[editor_plugins]
enabled=PoolStringArray( "node25d-cs" )
enabled=PackedStringArray("node25d-cs")
[input]
move_right={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":68,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777233,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
]
]
}
move_left={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":65,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777231,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
]
]
}
move_forward={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":87,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777232,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
]
]
}
move_back={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":83,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777234,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
]
]
}
movement_modifier={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777237,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777348,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777237,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777348,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":1,"pressure":0.0,"pressed":false,"script":null)
]
]
}
jump={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777350,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777350,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
]
]
}
reset_position={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":82,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777222,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":82,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777222,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":3,"pressure":0.0,"pressed":false,"script":null)
]
]
}
forty_five_mode={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":85,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777354,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":85,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777354,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
]
]
}
isometric_mode={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":73,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777355,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":73,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777355,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
]
]
}
top_down_mode={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":79,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777356,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":79,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777356,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
]
]
}
front_side_mode={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":74,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777351,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":74,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777351,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
]
]
}
oblique_y_mode={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":75,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777352,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":75,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777352,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":4,"pressure":0.0,"pressed":false,"script":null)
]
]
}
oblique_z_mode={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":76,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777353,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":76,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777353,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":5,"pressure":0.0,"pressed":false,"script":null)
]
]
}
toggle_isometric_controls={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":84,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":84,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":8,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777349,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777349,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
]
}
toggle_control_hints={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777218,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777347,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777218,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777347,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":10,"pressure":0.0,"pressed":false,"script":null)
]
]
}
move_clockwise={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":69,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777359,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":69,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777359,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":7,"pressure":0.0,"pressed":false,"script":null)
]
]
}
move_counterclockwise={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":81,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777357,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":81,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777357,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":6,"pressure":0.0,"pressed":false,"script":null)
]
]
}
view_cube_demo={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":67,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777358,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":67,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777358,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":2,"pressure":0.0,"pressed":false,"script":null)
]
]
}
exit={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777217,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":11,"pressure":0.0,"pressed":false,"script":null)
]
]
}
[physics]

View File

@@ -1,4 +1,4 @@
<Project Sdk="Godot.NET.Sdk/3.3.0">
<Project Sdk="Godot.NET.Sdk/4.0.0-dev5">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<RootNamespace>AndroidIAP</RootNamespace>

View File

@@ -43,7 +43,7 @@ namespace AndroidInAppPurchasesWithCSharp.GodotGooglePlayBilling
ItemNotOwned = 8,
}
public class BillingResult
public partial class BillingResult
{
public BillingResult() { }
public BillingResult(Dictionary billingResult)

View File

@@ -9,7 +9,7 @@ namespace AndroidInAppPurchasesWithCSharp.GodotGooglePlayBilling
Subs,
}
public class GooglePlayBilling : Node
public partial class GooglePlayBilling : Node
{
[Signal] public delegate void Connected();
[Signal] public delegate void Disconnected();

View File

@@ -12,7 +12,7 @@ namespace AndroidInAppPurchasesWithCSharp.GodotGooglePlayBilling
Pending = 2,
}
public class Purchase
public partial class Purchase
{
public Purchase() { }

View File

@@ -3,7 +3,7 @@ using Godot.Collections;
namespace AndroidInAppPurchasesWithCSharp.GodotGooglePlayBilling
{
public class PurchasesResult : BillingResult
public partial class PurchasesResult : BillingResult
{
public PurchasesResult() { }
public PurchasesResult(Dictionary purchasesResult)

View File

@@ -4,7 +4,7 @@ using Godot.Collections;
namespace AndroidInAppPurchasesWithCSharp.GodotGooglePlayBilling
{
public class SkuDetails
public partial class SkuDetails
{
public SkuDetails() { }

View File

@@ -5,7 +5,7 @@ using System;
namespace AndroidInAppPurchasesWithCSharp
{
public class Main : Control
public partial class Main : Control
{
const string TestItemSku = "my_in_app_purchase_sku";

View File

@@ -1,6 +1,6 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
[sub_resource type="Sky" id=1]
[resource]
background_mode = 2

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
type="StreamTexture2D"
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://icon.png"
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"]
[params]

View File

@@ -8,10 +8,10 @@ anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -512.711
margin_top = -300.0
margin_right = 511.289
margin_bottom = 300.0
offset_left = -512.711
offset_top = -300.0
offset_right = 511.289
offset_bottom = 300.0
size_flags_horizontal = 2
size_flags_vertical = 2
script = ExtResource( 1 )
@@ -24,22 +24,22 @@ anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = 64.0
margin_top = 64.0
margin_right = -64.0
margin_bottom = -64.0
offset_left = 64.0
offset_top = 64.0
offset_right = -64.0
offset_bottom = -64.0
grow_horizontal = 2
grow_vertical = 2
rect_min_size = Vector2( 400, 0 )
rect_min_size = Vector2(400, 0)
size_flags_vertical = 4
popup_exclusive = true
dialog_autowrap = true
[node name="Label" type="Label" parent="."]
margin_left = 300.0
margin_top = 40.0
margin_right = 996.0
margin_bottom = 156.0
offset_left = 300.0
offset_top = 40.0
offset_right = 996.0
offset_bottom = 156.0
size_flags_horizontal = 2
size_flags_vertical = 0
text = "To test in-app purchase on android device,
@@ -51,30 +51,30 @@ text = "To test in-app purchase on android device,
4. Changes you make in the Play Console may take some time before taking effect"
[node name="QuerySkuDetailsButton" type="Button" parent="."]
margin_left = 40.5697
margin_top = 39.9347
margin_right = 221.57
margin_bottom = 91.9347
offset_left = 40.5697
offset_top = 39.9347
offset_right = 221.57
offset_bottom = 91.9347
text = "Query SKU details"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="PurchaseButton" type="Button" parent="."]
margin_left = 40.5697
margin_top = 101.203
margin_right = 221.57
margin_bottom = 153.203
offset_left = 40.5697
offset_top = 101.203
offset_right = 221.57
offset_bottom = 153.203
text = "Purchase"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ConsumeButton" type="Button" parent="."]
margin_left = 40.5697
margin_top = 162.142
margin_right = 221.57
margin_bottom = 214.142
offset_left = 40.5697
offset_top = 162.142
offset_right = 221.57
offset_bottom = 214.142
text = "Consume"
__meta__ = {
"_edit_use_anchors_": false

View File

@@ -29,7 +29,7 @@ window/stretch/aspect="expand"
[gdnative]
singletons=[ ]
singletons=[]
[rendering]

View File

@@ -1,4 +1,4 @@
<Project Sdk="Godot.NET.Sdk/3.3.0">
<Project Sdk="Godot.NET.Sdk/4.0.0-dev5">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<RootNamespace>DodgeTheCreeps</RootNamespace>

View File

@@ -1,6 +1,6 @@
using Godot;
public class HUD : CanvasLayer
public partial class HUD : CanvasLayer
{
[Signal]
public delegate void StartGame();

View File

@@ -1,19 +1,19 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://HUD.cs" type="Script" id=1]
[ext_resource path="res://fonts/Xolonium-Regular.ttf" type="DynamicFontData" id=2]
[ext_resource path="res://fonts/Xolonium-Regular.ttf" type="FontData" id=2]
[sub_resource type="DynamicFont" id=1]
[sub_resource type="Font" id=1]
size = 64
use_mipmaps = true
font_data = ExtResource( 2 )
[sub_resource type="DynamicFont" id=2]
[sub_resource type="Font" id=2]
size = 64
use_mipmaps = true
font_data = ExtResource( 2 )
[sub_resource type="DynamicFont" id=3]
[sub_resource type="Font" id=3]
size = 64
use_mipmaps = true
font_data = ExtResource( 2 )
@@ -24,9 +24,9 @@ script = ExtResource( 1 )
[node name="ScoreLabel" type="Label" parent="."]
anchor_left = 0.5
anchor_right = 0.5
margin_left = -25.0
margin_right = 25.0
margin_bottom = 100.0
offset_left = -25.0
offset_right = 25.0
offset_bottom = 100.0
custom_fonts/font = SubResource( 1 )
text = "0
"
@@ -37,9 +37,9 @@ anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -200.0
margin_top = -150.0
margin_right = 200.0
offset_left = -200.0
offset_top = -150.0
offset_right = 200.0
custom_fonts/font = SubResource( 2 )
text = "Dodge the
Creeps!"
@@ -51,10 +51,10 @@ anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
margin_left = -100.0
margin_top = -200.0
margin_right = 100.0
margin_bottom = -100.0
offset_left = -100.0
offset_top = -200.0
offset_right = 100.0
offset_bottom = -100.0
custom_fonts/font = SubResource( 3 )
text = "Start"

View File

@@ -1,6 +1,6 @@
using Godot;
public class Main : Node
public partial class Main : Node
{
#pragma warning disable 649
// We assign this in the editor, so we don't need the warning about not being assigned.
@@ -70,7 +70,7 @@ public class Main : Node
mobSpawnLocation.Offset = GD.Randi();
// Create a Mob instance and add it to the scene.
var mob = (Mob)mobScene.Instance();
var mob = (Mob)mobScene.Instantiate();
AddChild(mob);
// Set the mob's direction perpendicular to the path direction.

View File

@@ -9,7 +9,7 @@
[sub_resource type="Curve2D" id=1]
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 480, 0, 0, 0, 0, 0, 480, 720, 0, 0, 0, 0, 0, 720, 0, 0, 0, 0, 0, 0 )
"points": PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 480, 0, 0, 0, 0, 0, 480, 720, 0, 0, 0, 0, 0, 720, 0, 0, 0, 0, 0, 0)
}
[node name="Main" type="Node"]
@@ -19,7 +19,7 @@ mobScene = ExtResource( 2 )
[node name="ColorRect" type="ColorRect" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
color = Color( 0.219608, 0.372549, 0.380392, 1 )
color = Color(0.219608, 0.372549, 0.380392, 1)
[node name="Player" parent="." instance=ExtResource( 3 )]
@@ -33,7 +33,7 @@ wait_time = 2.0
one_shot = true
[node name="StartPosition" type="Position2D" parent="."]
position = Vector2( 240, 450 )
position = Vector2(240, 450)
[node name="MobPath" type="Path2D" parent="."]
curve = SubResource( 1 )

View File

@@ -1,10 +1,10 @@
using Godot;
public class Mob : RigidBody2D
public partial class Mob : RigidBody2D
{
public override void _Ready()
{
var animSprite = GetNode<AnimatedSprite>("AnimatedSprite");
var animSprite = GetNode<AnimatedSprite2D>("AnimatedSprite2D");
animSprite.Playing = true;
string[] mobTypes = animSprite.Frames.GetAnimationNames();
animSprite.Animation = mobTypes[GD.Randi() % mobTypes.Length];

View File

@@ -1,30 +1,30 @@
[gd_scene load_steps=10 format=2]
[ext_resource path="res://Mob.cs" type="Script" id=1]
[ext_resource path="res://art/enemySwimming_1.png" type="Texture" id=2]
[ext_resource path="res://art/enemySwimming_2.png" type="Texture" id=3]
[ext_resource path="res://art/enemyWalking_1.png" type="Texture" id=4]
[ext_resource path="res://art/enemyWalking_2.png" type="Texture" id=5]
[ext_resource path="res://art/enemyFlyingAlt_1.png" type="Texture" id=6]
[ext_resource path="res://art/enemyFlyingAlt_2.png" type="Texture" id=7]
[ext_resource path="res://art/enemySwimming_1.png" type="Texture2D" id=2]
[ext_resource path="res://art/enemySwimming_2.png" type="Texture2D" id=3]
[ext_resource path="res://art/enemyWalking_1.png" type="Texture2D" id=4]
[ext_resource path="res://art/enemyWalking_2.png" type="Texture2D" id=5]
[ext_resource path="res://art/enemyFlyingAlt_1.png" type="Texture2D" id=6]
[ext_resource path="res://art/enemyFlyingAlt_2.png" type="Texture2D" id=7]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 4 ), ExtResource( 5 ) ],
animations = [{
"frames": [ExtResource( 4 ), ExtResource( 5 )],
"loop": true,
"name": "walk",
"speed": 4.0
}, {
"frames": [ ExtResource( 6 ), ExtResource( 7 ) ],
"frames": [ExtResource( 6 ), ExtResource( 7 )],
"loop": true,
"name": "fly",
"speed": 3.0
}, {
"frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
"frames": [ExtResource( 2 ), ExtResource( 3 )],
"loop": true,
"name": "swim",
"speed": 4.0
} ]
}]
[sub_resource type="CapsuleShape2D" id=2]
radius = 35.8898
@@ -38,8 +38,8 @@ __meta__ = {
"_edit_group_": true
}
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
scale = Vector2( 0.75, 0.75 )
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
scale = Vector2(0.75, 0.75)
frames = SubResource( 1 )
animation = "walk"
@@ -47,8 +47,8 @@ animation = "walk"
rotation = 1.5708
shape = SubResource( 2 )
[node name="Visibility" type="VisibilityNotifier2D" parent="."]
position = Vector2( -0.315128, -9.53674e-07 )
scale = Vector2( 5.00208, 3.58402 )
[node name="Visibility" type="VisibleOnScreenNotifier2D" parent="."]
position = Vector2(-0.315128, -9.53674e-07)
scale = Vector2(5.00208, 3.58402)
[connection signal="screen_exited" from="Visibility" to="." method="OnVisibilityScreenExited"]

View File

@@ -1,6 +1,6 @@
using Godot;
public class Player : Area2D
public partial class Player : Area2D
{
[Signal]
public delegate void Hit();
@@ -40,7 +40,7 @@ public class Player : Area2D
velocity.y -= 1;
}
var animatedSprite = GetNode<AnimatedSprite>("AnimatedSprite");
var animatedSprite = GetNode<AnimatedSprite2D>("AnimatedSprite2D");
if (velocity.Length() > 0)
{

View File

@@ -1,43 +1,43 @@
[gd_scene load_steps=13 format=2]
[ext_resource path="res://Player.cs" type="Script" id=1]
[ext_resource path="res://art/playerGrey_walk1.png" type="Texture" id=2]
[ext_resource path="res://art/playerGrey_walk2.png" type="Texture" id=3]
[ext_resource path="res://art/playerGrey_up1.png" type="Texture" id=4]
[ext_resource path="res://art/playerGrey_up2.png" type="Texture" id=5]
[ext_resource path="res://art/playerGrey_walk1.png" type="Texture2D" id=2]
[ext_resource path="res://art/playerGrey_walk2.png" type="Texture2D" id=3]
[ext_resource path="res://art/playerGrey_up1.png" type="Texture2D" id=4]
[ext_resource path="res://art/playerGrey_up2.png" type="Texture2D" id=5]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
animations = [{
"frames": [ExtResource( 2 ), ExtResource( 3 )],
"loop": true,
"name": "right",
"speed": 5.0
}, {
"frames": [ ExtResource( 4 ), ExtResource( 5 ) ],
"frames": [ExtResource( 4 ), ExtResource( 5 )],
"loop": true,
"name": "up",
"speed": 5.0
} ]
}]
[sub_resource type="CapsuleShape2D" id=2]
radius = 27.3777
height = 14.0303
[sub_resource type="Gradient" id=3]
colors = PoolColorArray( 1, 1, 1, 0.501961, 1, 1, 1, 0 )
colors = PackedColorArray(1, 1, 1, 0.501961, 1, 1, 1, 0)
[sub_resource type="GradientTexture" id=4]
gradient = SubResource( 3 )
[sub_resource type="Curve" id=5]
_data = [ Vector2( 0.00451484, 0.5176 ), 0.0, 0.0, 0, 0, Vector2( 0.98702, 0.3152 ), 0.0, 0.0, 0, 0 ]
_data = [Vector2(0.00451484, 0.5176), 0.0, 0.0, 0, 0, Vector2(0.98702, 0.3152), 0.0, 0.0, 0, 0]
[sub_resource type="CurveTexture" id=6]
curve = SubResource( 5 )
[sub_resource type="ParticlesMaterial" id=7]
flag_disable_z = true
gravity = Vector3( 0, 0, 0 )
gravity = Vector3(0, 0, 0)
initial_velocity = 1.0
orbit_velocity = 0.0
orbit_velocity_random = 0.0
@@ -52,15 +52,15 @@ __meta__ = {
"_edit_group_": true
}
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
scale = Vector2( 0.5, 0.5 )
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
scale = Vector2(0.5, 0.5)
frames = SubResource( 1 )
animation = "right"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 2 )
[node name="Trail" type="Particles2D" parent="."]
[node name="Trail" type="GPUParticles2D" parent="."]
show_behind_parent = true
z_index = -1
amount = 10

View File

@@ -2,12 +2,12 @@
importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggstr"
path="res://.godot/imported/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggstr"
[deps]
source_file="res://art/House In a Forest Loop.ogg"
dest_files=[ "res://.import/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggstr" ]
dest_files=["res://.godot/imported/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggstr"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemyFlyingAlt_1.png-559f599b16c69b112c1b53f6332e9489.stex"
type="StreamTexture2D"
path="res://.godot/imported/enemyFlyingAlt_1.png-559f599b16c69b112c1b53f6332e9489.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://art/enemyFlyingAlt_1.png"
dest_files=[ "res://.import/enemyFlyingAlt_1.png-559f599b16c69b112c1b53f6332e9489.stex" ]
dest_files=["res://.godot/imported/enemyFlyingAlt_1.png-559f599b16c69b112c1b53f6332e9489.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemyFlyingAlt_2.png-31dc7310eda6e1b721224f3cd932c076.stex"
type="StreamTexture2D"
path="res://.godot/imported/enemyFlyingAlt_2.png-31dc7310eda6e1b721224f3cd932c076.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://art/enemyFlyingAlt_2.png"
dest_files=[ "res://.import/enemyFlyingAlt_2.png-31dc7310eda6e1b721224f3cd932c076.stex" ]
dest_files=["res://.godot/imported/enemyFlyingAlt_2.png-31dc7310eda6e1b721224f3cd932c076.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemySwimming_1.png-dd0e11759dc3d624c8a704f6e98a3d80.stex"
type="StreamTexture2D"
path="res://.godot/imported/enemySwimming_1.png-dd0e11759dc3d624c8a704f6e98a3d80.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://art/enemySwimming_1.png"
dest_files=[ "res://.import/enemySwimming_1.png-dd0e11759dc3d624c8a704f6e98a3d80.stex" ]
dest_files=["res://.godot/imported/enemySwimming_1.png-dd0e11759dc3d624c8a704f6e98a3d80.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemySwimming_2.png-4c0cbc0732264c4ea3290340bd4a0a62.stex"
type="StreamTexture2D"
path="res://.godot/imported/enemySwimming_2.png-4c0cbc0732264c4ea3290340bd4a0a62.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://art/enemySwimming_2.png"
dest_files=[ "res://.import/enemySwimming_2.png-4c0cbc0732264c4ea3290340bd4a0a62.stex" ]
dest_files=["res://.godot/imported/enemySwimming_2.png-4c0cbc0732264c4ea3290340bd4a0a62.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemyWalking_1.png-5af6eedbe61b701677d490ffdc1e6471.stex"
type="StreamTexture2D"
path="res://.godot/imported/enemyWalking_1.png-5af6eedbe61b701677d490ffdc1e6471.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://art/enemyWalking_1.png"
dest_files=[ "res://.import/enemyWalking_1.png-5af6eedbe61b701677d490ffdc1e6471.stex" ]
dest_files=["res://.godot/imported/enemyWalking_1.png-5af6eedbe61b701677d490ffdc1e6471.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemyWalking_2.png-67c480ed60c35e95f5acb0436246b935.stex"
type="StreamTexture2D"
path="res://.godot/imported/enemyWalking_2.png-67c480ed60c35e95f5acb0436246b935.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://art/enemyWalking_2.png"
dest_files=[ "res://.import/enemyWalking_2.png-67c480ed60c35e95f5acb0436246b935.stex" ]
dest_files=["res://.godot/imported/enemyWalking_2.png-67c480ed60c35e95f5acb0436246b935.stex"]
[params]

View File

@@ -2,12 +2,12 @@
importer="wav"
type="AudioStreamSample"
path="res://.import/gameover.wav-98c95c744b35280048c2bd093cf8a356.sample"
path="res://.godot/imported/gameover.wav-98c95c744b35280048c2bd093cf8a356.sample"
[deps]
source_file="res://art/gameover.wav"
dest_files=[ "res://.import/gameover.wav-98c95c744b35280048c2bd093cf8a356.sample" ]
dest_files=["res://.godot/imported/gameover.wav-98c95c744b35280048c2bd093cf8a356.sample"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/playerGrey_up1.png-6bd114d0a6beac91f48e3a7314d44564.stex"
type="StreamTexture2D"
path="res://.godot/imported/playerGrey_up1.png-6bd114d0a6beac91f48e3a7314d44564.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://art/playerGrey_up1.png"
dest_files=[ "res://.import/playerGrey_up1.png-6bd114d0a6beac91f48e3a7314d44564.stex" ]
dest_files=["res://.godot/imported/playerGrey_up1.png-6bd114d0a6beac91f48e3a7314d44564.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/playerGrey_up2.png-d6aba85f5f2675ebc7045efa7552ee79.stex"
type="StreamTexture2D"
path="res://.godot/imported/playerGrey_up2.png-d6aba85f5f2675ebc7045efa7552ee79.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://art/playerGrey_up2.png"
dest_files=[ "res://.import/playerGrey_up2.png-d6aba85f5f2675ebc7045efa7552ee79.stex" ]
dest_files=["res://.godot/imported/playerGrey_up2.png-d6aba85f5f2675ebc7045efa7552ee79.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/playerGrey_walk1.png-c4773fe7a7bf85d7ab732eb4458c2742.stex"
type="StreamTexture2D"
path="res://.godot/imported/playerGrey_walk1.png-c4773fe7a7bf85d7ab732eb4458c2742.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://art/playerGrey_walk1.png"
dest_files=[ "res://.import/playerGrey_walk1.png-c4773fe7a7bf85d7ab732eb4458c2742.stex" ]
dest_files=["res://.godot/imported/playerGrey_walk1.png-c4773fe7a7bf85d7ab732eb4458c2742.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/playerGrey_walk2.png-34d2d916366100182d08037c51884043.stex"
type="StreamTexture2D"
path="res://.godot/imported/playerGrey_walk2.png-34d2d916366100182d08037c51884043.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://art/playerGrey_walk2.png"
dest_files=[ "res://.import/playerGrey_walk2.png-34d2d916366100182d08037c51884043.stex" ]
dest_files=["res://.godot/imported/playerGrey_walk2.png-34d2d916366100182d08037c51884043.stex"]
[params]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
type="StreamTexture2D"
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://icon.png"
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"]
[params]

View File

@@ -29,33 +29,33 @@ window/size/height=720
move_left={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777231,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":65,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
]
]
}
move_right={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777233,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":68,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
]
]
}
move_up={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777232,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":87,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
]
]
}
move_down={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777234,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":83,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
]
]
}

View File

@@ -1,4 +1,4 @@
<Project Sdk="Godot.NET.Sdk/3.3.0">
<Project Sdk="Godot.NET.Sdk/4.0.0-dev5">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<RootNamespace>PongMultiplayer</RootNamespace>

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/ball.png-9a4ca347acb7532f6ae347744a6b04f7.stex"
type="StreamTexture2D"
path="res://.godot/imported/ball.png-9a4ca347acb7532f6ae347744a6b04f7.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://ball.png"
dest_files=[ "res://.import/ball.png-9a4ca347acb7532f6ae347744a6b04f7.stex" ]
dest_files=["res://.godot/imported/ball.png-9a4ca347acb7532f6ae347744a6b04f7.stex"]
[params]

View File

@@ -1,6 +1,6 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://ball.png" type="Texture" id=1]
[ext_resource path="res://ball.png" type="Texture2D" id=1]
[ext_resource path="res://logic/Ball.cs" type="Script" id=2]
[sub_resource type="CircleShape2D" id=1]
@@ -9,7 +9,7 @@ radius = 4.65663
[node name="Ball" type="Area2D"]
script = ExtResource( 2 )
[node name="Sprite" type="Sprite" parent="."]
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
type="StreamTexture2D"
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://icon.png"
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"]
[params]

View File

@@ -7,10 +7,10 @@ anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -320.0
margin_top = -200.0
margin_right = 320.0
margin_bottom = 200.0
offset_left = -320.0
offset_top = -200.0
offset_right = 320.0
offset_bottom = 200.0
size_flags_horizontal = 2
size_flags_vertical = 2
__meta__ = {
@@ -18,10 +18,10 @@ __meta__ = {
}
[node name="Title" type="Label" parent="."]
margin_left = 210.0
margin_top = 40.0
margin_right = 430.0
margin_bottom = 80.0
offset_left = 210.0
offset_top = 40.0
offset_right = 430.0
offset_bottom = 80.0
size_flags_horizontal = 2
size_flags_vertical = 0
text = "Multiplayer Pong"
@@ -29,10 +29,10 @@ align = 1
valign = 1
[node name="LobbyPanel" type="Panel" parent="."]
margin_left = 210.0
margin_top = 160.0
margin_right = 430.0
margin_bottom = 270.0
offset_left = 210.0
offset_top = 160.0
offset_right = 430.0
offset_bottom = 270.0
size_flags_horizontal = 2
size_flags_vertical = 2
script = ExtResource( 1 )
@@ -41,37 +41,37 @@ __meta__ = {
}
[node name="AddressLabel" type="Label" parent="LobbyPanel"]
margin_left = 10.0
margin_top = 10.0
margin_right = 62.0
margin_bottom = 24.0
offset_left = 10.0
offset_top = 10.0
offset_right = 62.0
offset_bottom = 24.0
size_flags_horizontal = 2
size_flags_vertical = 0
text = "Address"
[node name="Address" type="LineEdit" parent="LobbyPanel"]
margin_left = 10.0
margin_top = 30.0
margin_right = 210.0
margin_bottom = 54.0
offset_left = 10.0
offset_top = 30.0
offset_right = 210.0
offset_bottom = 54.0
size_flags_horizontal = 2
size_flags_vertical = 2
text = "127.0.0.1"
[node name="HostButton" type="Button" parent="LobbyPanel"]
margin_left = 10.0
margin_top = 60.0
margin_right = 90.0
margin_bottom = 80.0
offset_left = 10.0
offset_top = 60.0
offset_right = 90.0
offset_bottom = 80.0
size_flags_horizontal = 2
size_flags_vertical = 2
text = "Host"
[node name="JoinButton" type="Button" parent="LobbyPanel"]
margin_left = 130.0
margin_top = 60.0
margin_right = 210.0
margin_bottom = 80.0
offset_left = 130.0
offset_top = 60.0
offset_right = 210.0
offset_bottom = 80.0
size_flags_horizontal = 2
size_flags_vertical = 2
text = "Join"
@@ -80,23 +80,23 @@ __meta__ = {
}
[node name="StatusOk" type="Label" parent="LobbyPanel"]
margin_left = 10.0
margin_top = 90.0
margin_right = 210.0
margin_bottom = 104.0
offset_left = 10.0
offset_top = 90.0
offset_right = 210.0
offset_bottom = 104.0
size_flags_horizontal = 2
size_flags_vertical = 0
custom_colors/font_color = Color( 0, 1, 0.015625, 1 )
custom_colors/font_color = Color(0, 1, 0.015625, 1)
align = 1
[node name="StatusFail" type="Label" parent="LobbyPanel"]
margin_left = 10.0
margin_top = 90.0
margin_right = 210.0
margin_bottom = 104.0
offset_left = 10.0
offset_top = 90.0
offset_right = 210.0
offset_bottom = 104.0
size_flags_horizontal = 2
size_flags_vertical = 0
custom_colors/font_color = Color( 1, 0, 0, 1 )
custom_colors/font_color = Color(1, 0, 0, 1)
align = 1
[connection signal="pressed" from="LobbyPanel/HostButton" to="LobbyPanel" method="OnHostPressed"]

View File

@@ -1,7 +1,7 @@
using Godot;
using System;
public class Ball : Area2D
public partial class Ball : Area2D
{
private const int DefaultSpeed = 100;

View File

@@ -2,7 +2,7 @@ using Godot;
using System;
using Godot.Collections;
public class Lobby : Control
public partial class Lobby : Control
{
private const int DefaultPort = 8910; // An arbitrary number.
private const int MaxNumberOfPeers = 1; // How many people we want to have in a game
@@ -38,7 +38,7 @@ public class Lobby : Control
private void PlayerConnected(int id)
{
// Someone connected, start the game!
var pong = ResourceLoader.Load<PackedScene>("res://pong.tscn").Instance();
var pong = ResourceLoader.Load<PackedScene>("res://pong.tscn").Instantiate();
// Connect deferred so we can safely erase it from the callback.
pong.Connect("GameFinished", this, nameof(EndGame), new Godot.Collections.Array(), (int) ConnectFlags.Deferred);

View File

@@ -1,7 +1,7 @@
using Godot;
using System;
public class Paddle : Area2D
public partial class Paddle : Area2D
{
private const int MotionSpeed = 150;

View File

@@ -1,7 +1,7 @@
using Godot;
using System;
public class Pong : Node2D
public partial class Pong : Node2D
{
[Signal]
private delegate void GameFinished(string withError);

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/paddle.png-0e798fb0912613386507c9904d5cc01a.stex"
type="StreamTexture2D"
path="res://.godot/imported/paddle.png-0e798fb0912613386507c9904d5cc01a.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://paddle.png"
dest_files=[ "res://.import/paddle.png-0e798fb0912613386507c9904d5cc01a.stex" ]
dest_files=["res://.godot/imported/paddle.png-0e798fb0912613386507c9904d5cc01a.stex"]
[params]

View File

@@ -1,7 +1,7 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://logic/Paddle.cs" type="Script" id=1]
[ext_resource path="res://paddle.png" type="Texture" id=2]
[ext_resource path="res://paddle.png" type="Texture2D" id=2]
[sub_resource type="CapsuleShape2D" id=1]
radius = 4.78568
@@ -10,17 +10,17 @@ height = 23.6064
[node name="Paddle" type="Area2D"]
script = ExtResource( 1 )
[node name="Sprite" type="Sprite" parent="."]
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource( 2 )
[node name="Shape" type="CollisionShape2D" parent="."]
[node name="Shape3D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
[node name="You" type="Label" parent="."]
margin_left = -26.0
margin_top = -33.0
margin_right = 27.0
margin_bottom = -19.0
offset_left = -26.0
offset_top = -33.0
offset_right = 27.0
offset_bottom = -19.0
size_flags_horizontal = 2
size_flags_vertical = 0
text = "You"

View File

@@ -1,7 +1,7 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://logic/Pong.cs" type="Script" id=1]
[ext_resource path="res://separator.png" type="Texture" id=2]
[ext_resource path="res://separator.png" type="Texture2D" id=2]
[ext_resource path="res://paddle.tscn" type="PackedScene" id=3]
[ext_resource path="res://ball.tscn" type="PackedScene" id=4]
@@ -9,44 +9,44 @@
script = ExtResource( 1 )
[node name="ColorRect" type="ColorRect" parent="."]
margin_right = 640.0
margin_bottom = 400.0
color = Color( 0.141176, 0.152941, 0.164706, 1 )
offset_right = 640.0
offset_bottom = 400.0
color = Color(0.141176, 0.152941, 0.164706, 1)
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Separator" type="Sprite" parent="."]
position = Vector2( 320, 200 )
[node name="Separator" type="Sprite2D" parent="."]
position = Vector2(320, 200)
texture = ExtResource( 2 )
[node name="Player1" parent="." instance=ExtResource( 3 )]
modulate = Color( 0, 1, 1, 1 )
position = Vector2( 32.49, 188.622 )
modulate = Color(0, 1, 1, 1)
position = Vector2(32.49, 188.622)
_left = true
[node name="Player2" parent="." instance=ExtResource( 3 )]
modulate = Color( 1, 0, 1, 1 )
position = Vector2( 608.88, 188.622 )
modulate = Color(1, 0, 1, 1)
position = Vector2(608.88, 188.622)
[node name="Ball" parent="." instance=ExtResource( 4 )]
position = Vector2( 320.206, 184 )
position = Vector2(320.206, 184)
[node name="ScoreLeft" type="Label" parent="."]
margin_left = 240.0
margin_top = 10.0
margin_right = 280.0
margin_bottom = 30.0
offset_left = 240.0
offset_top = 10.0
offset_right = 280.0
offset_bottom = 30.0
size_flags_horizontal = 2
size_flags_vertical = 0
text = "0"
align = 1
[node name="ScoreRight" type="Label" parent="."]
margin_left = 360.0
margin_top = 10.0
margin_right = 400.0
margin_bottom = 30.0
offset_left = 360.0
offset_top = 10.0
offset_right = 400.0
offset_bottom = 30.0
size_flags_horizontal = 2
size_flags_vertical = 0
text = "0"
@@ -54,36 +54,36 @@ align = 1
[node name="WinnerLeft" type="Label" parent="."]
visible = false
margin_left = 190.0
margin_top = 170.0
margin_right = 267.0
margin_bottom = 184.0
offset_left = 190.0
offset_top = 170.0
offset_right = 267.0
offset_bottom = 184.0
size_flags_horizontal = 2
size_flags_vertical = 0
text = "The Winner!"
[node name="WinnerRight" type="Label" parent="."]
visible = false
margin_left = 380.0
margin_top = 170.0
margin_right = 457.0
margin_bottom = 184.0
offset_left = 380.0
offset_top = 170.0
offset_right = 457.0
offset_bottom = 184.0
size_flags_horizontal = 2
size_flags_vertical = 0
text = "The Winner!"
[node name="ExitGame" type="Button" parent="."]
visible = false
margin_left = 280.0
margin_top = 340.0
margin_right = 360.0
margin_bottom = 360.0
offset_left = 280.0
offset_top = 340.0
offset_right = 360.0
offset_bottom = 360.0
size_flags_horizontal = 2
size_flags_vertical = 2
text = "Exit Game"
[node name="Camera2D" type="Camera2D" parent="."]
offset = Vector2( 320, 200 )
offset = Vector2(320, 200)
current = true
[connection signal="pressed" from="ExitGame" to="." method="OnExitGamePressed"]

View File

@@ -28,21 +28,21 @@ window/stretch/aspect="expand"
move_down={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777234,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":90,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":90,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":83,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
]
}
move_up={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777232,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":65,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":87,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
]
}
[rendering]

View File

@@ -1,8 +1,8 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/separator.png-f981c8489b9148e2e1dc63398273da74.stex"
type="StreamTexture2D"
path="res://.godot/imported/separator.png-f981c8489b9148e2e1dc63398273da74.stex"
metadata={
"vram_texture": false
}
@@ -10,7 +10,7 @@ metadata={
[deps]
source_file="res://separator.png"
dest_files=[ "res://.import/separator.png-f981c8489b9148e2e1dc63398273da74.stex" ]
dest_files=["res://.godot/imported/separator.png-f981c8489b9148e2e1dc63398273da74.stex"]
[params]

View File

@@ -1,6 +1,6 @@
using Godot;
public class Ball : Area2D
public partial class Ball : Area2D
{
private const int DefaultSpeed = 100;

View File

@@ -1,6 +1,6 @@
using Godot;
public class CeilingFloor : Area2D
public partial class CeilingFloor : Area2D
{
[Export]
private int _bounceDirection = 1;

Some files were not shown because too many files have changed in this diff Show More