Compare commits

...

6 Commits

Author SHA1 Message Date
LittleSheep
e54215423d Grid layer system 2025-08-27 17:52:53 +08:00
LittleSheep
84b908ef51 Rotate building tiles 2025-08-27 17:37:31 +08:00
LittleSheep
c078204e60 Player movement with sprints and optimzation 2025-08-27 17:37:04 +08:00
LittleSheep
e9b070ff35 Building duartion 2025-08-27 02:42:13 +08:00
LittleSheep
3d11cecd5e Miner tile 2025-08-26 23:12:46 +08:00
LittleSheep
6f2969d880 💄 Optimize movement 2025-08-26 23:12:39 +08:00
14 changed files with 412 additions and 77 deletions

View File

@@ -1,5 +1,19 @@
{ {
"wall": "res://Scenes/Tiles/WallTile.tscn", "wall": {
"farm": "res://Scenes/Tiles/FarmTile.tscn", "scene": "res://Scenes/Tiles/WallTile.tscn",
"tower": "res://Scenes/Tiles/TowerTile.tscn" "cost": {
"stone": 5
},
"durability": 100,
"buildTime": 1.5
},
"miner": {
"scene": "res://Scenes/Tiles/MinerTile.tscn",
"cost": {
"wood": 10,
"stone": 3
},
"durability": 200,
"buildTime": 3.0
}
} }

View File

@@ -7,11 +7,13 @@
script = ExtResource("1_08t41") script = ExtResource("1_08t41")
[node name="Sprite2D" type="Sprite2D" parent="."] [node name="Sprite2D" type="Sprite2D" parent="."]
rotation = 1.5708
scale = Vector2(0.1, 0.1) scale = Vector2(0.1, 0.1)
texture = ExtResource("1_ucweq") texture = ExtResource("1_ucweq")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
position = Vector2(1, 2.5) position = Vector2(1, 2.5)
rotation = 1.5708
polygon = PackedVector2Array(54, 87.5, 62, 76.5, 7, -89.5, -1, -92.5, -10, -89.5, -64, 76.5, -55, 87.5) polygon = PackedVector2Array(54, 87.5, 62, 76.5, 7, -89.5, -1, -92.5, -10, -89.5, -64, 76.5, -55, 87.5)
[node name="Camera2D" type="Camera2D" parent="."] [node name="Camera2D" type="Camera2D" parent="."]

BIN
Scenes/Tiles/MinerTile.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bn80thu20eaia"
path="res://.godot/imported/MinerTile.png-a6c5eba73cdda5685afda8ced0234fec.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Scenes/Tiles/MinerTile.png"
dest_files=["res://.godot/imported/MinerTile.png-a6c5eba73cdda5685afda8ced0234fec.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@@ -0,0 +1,23 @@
[gd_scene load_steps=4 format=3 uid="uid://cbu81slklwq3u"]
[ext_resource type="Script" uid="uid://dyubkyqtpcg3a" path="res://Scripts/Tiles/MinerTile.cs" id="1_mecoy"]
[ext_resource type="Texture2D" uid="uid://bn80thu20eaia" path="res://Scenes/Tiles/MinerTile.png" id="2_mecoy"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_8o613"]
size = Vector2(54, 54)
[node name="MinerTile" type="StaticBody2D"]
script = ExtResource("1_mecoy")
[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(0.1, 0.1)
texture = ExtResource("2_mecoy")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_8o613")
[node name="ProgressOverlay" type="ColorRect" parent="."]
offset_left = -27.0
offset_top = -27.0
offset_right = 27.0
offset_bottom = 27.0

View File

@@ -15,3 +15,9 @@ texture = ExtResource("1_8o613")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_8o613") shape = SubResource("RectangleShape2D_8o613")
[node name="ProgressOverlay" type="ColorRect" parent="."]
offset_left = -27.0
offset_top = -27.0
offset_right = 27.0
offset_bottom = 27.0

View File

@@ -5,22 +5,62 @@ namespace AceFieldNewHorizon.Scripts.Entities;
public partial class Player : CharacterBody2D public partial class Player : CharacterBody2D
{ {
[Export] public float Speed = 400.0f; [Export] public float MaxSpeed = 400.0f;
[Export] public float SprintMultiplier = 1.8f; // 80% faster when sprinting
[Export] public float Acceleration = 1500.0f;
[Export] public float SprintAcceleration = 1800.0f; // Slightly faster acceleration when sprinting
[Export] public float Deceleration = 1200.0f;
[Export] public float RotationSpeed = 3.0f;
public override void _Process(double delta) public override void _Process(double delta)
{ {
// Get direction to mouse and calculate angle // Get direction to mouse and calculate angle
var mousePos = GetGlobalMousePosition(); var mousePos = GetGlobalMousePosition();
var direction = GlobalPosition.DirectionTo(mousePos); var direction = GlobalPosition.DirectionTo(mousePos);
Rotation = direction.Angle() + (float)Math.PI / 2; Rotation = direction.Angle();
} }
public override void _PhysicsProcess(double delta) public override void _PhysicsProcess(double delta)
{ {
// Get movement input // Get movement input
var inputDirection = Input.GetVector("move_left", "move_right", "move_up", "move_down"); var moveForward = Input.GetActionStrength("move_up") - Input.GetActionStrength("move_down");
Velocity = inputDirection * Speed; var moveHorizontal = Input.GetActionStrength("move_right") - Input.GetActionStrength("move_left");
var isSprinting = Input.IsActionPressed("move_sprint");
// Calculate movement parameters based on sprint state
var currentMaxSpeed = isSprinting ? MaxSpeed * SprintMultiplier : MaxSpeed;
var currentAcceleration = isSprinting ? SprintAcceleration : Acceleration;
// Calculate desired movement direction
var forwardVector = Vector2.Right.Rotated(Rotation);
var rightVector = new Vector2(-forwardVector.Y, forwardVector.X);
// Calculate target velocity based on input
var targetVelocity = (forwardVector * moveForward + rightVector * moveHorizontal).Normalized() * currentMaxSpeed;
// Apply acceleration or deceleration
var currentSpeed = Velocity.Length();
var isAccelerating = targetVelocity != Vector2.Zero;
if (isAccelerating)
{
// Accelerate towards target velocity
Velocity = Velocity.MoveToward(targetVelocity, (float)(currentAcceleration * delta));
}
else
{
// Apply deceleration when no input
if (currentSpeed > 0)
{
var decelAmount = (float)(Deceleration * delta);
if (currentSpeed <= decelAmount)
Velocity = Vector2.Zero;
else
Velocity = Velocity.Normalized() * (currentSpeed - decelAmount);
}
}
// Apply the movement
MoveAndSlide(); MoveAndSlide();
} }
} }

View File

@@ -5,7 +5,14 @@ namespace AceFieldNewHorizon.Scripts.System;
public partial class BuildingRegistry : Node public partial class BuildingRegistry : Node
{ {
private Dictionary<string, PackedScene> _registry = new(); public record BuildingData(
PackedScene Scene,
Dictionary<string, int> Cost,
int Durability,
float BuildTime
);
private Dictionary<string, BuildingData> _registry = new();
[Export] public string JsonPath { get; set; } = "res://Data/Buildings.json"; [Export] public string JsonPath { get; set; } = "res://Data/Buildings.json";
@@ -38,26 +45,87 @@ public partial class BuildingRegistry : Node
foreach (string key in dict.Keys) foreach (string key in dict.Keys)
{ {
var scenePath = dict[key].AsString(); // Each entry is a Dictionary with keys: "scene", "cost", "durability", "buildTime"
var scene = GD.Load<PackedScene>(scenePath); var buildingDict = dict[key].AsGodotDictionary();
if (scene != null) // Parse scene
var scenePath = buildingDict.ContainsKey("scene") ? buildingDict["scene"].AsString() : null;
if (string.IsNullOrEmpty(scenePath))
{ {
_registry[key] = scene; GD.PrintErr($"[BuildingRegistry] No scene path for '{key}'");
GD.Print($"[BuildingRegistry] Loaded building '{key}' from {scenePath}"); continue;
} }
else
var scene = GD.Load<PackedScene>(scenePath);
if (scene == null)
{ {
GD.PrintErr($"[BuildingRegistry] Failed to load scene for '{key}' at {scenePath}"); GD.PrintErr($"[BuildingRegistry] Failed to load scene for '{key}' at {scenePath}");
continue;
} }
// Parse cost
Dictionary<string, int> cost = new();
if (buildingDict.TryGetValue("cost", out var value))
{
var costDict = value.AsGodotDictionary();
foreach (string mat in costDict.Keys)
{
int val;
var obj = costDict[mat];
if (obj.VariantType == Variant.Type.PackedInt64Array)
val = (int)obj.AsInt64();
else if (obj.VariantType == Variant.Type.PackedInt32Array)
val = obj.AsInt32();
else
int.TryParse(obj.ToString(), out val);
cost[mat] = val;
}
}
// Parse durability
var durability = 0;
if (buildingDict.TryGetValue("durability", out var dObj))
{
if (dObj.VariantType == Variant.Type.PackedInt64Array)
durability = (int)dObj.AsInt64();
else if (dObj.VariantType == Variant.Type.PackedInt32Array)
durability = dObj.AsInt32();
else
int.TryParse(dObj.ToString(), out durability);
}
// Parse buildTime
var buildTime = 0f;
if (buildingDict.TryGetValue("buildTime", out var bObj))
{
switch (bObj.VariantType)
{
case Variant.Type.PackedFloat32Array or Variant.Type.PackedFloat64Array:
buildTime = (float)bObj.AsDouble();
break;
case Variant.Type.PackedInt64Array:
buildTime = bObj.AsInt64();
break;
case Variant.Type.PackedInt32Array:
buildTime = bObj.AsInt32();
break;
default:
float.TryParse(bObj.ToString(), out buildTime);
break;
}
}
var buildingData = new BuildingData(scene, cost, durability, buildTime);
_registry[key] = buildingData;
GD.Print($"[BuildingRegistry] Loaded building '{key}' from {scenePath}");
} }
GD.Print($"[BuildingRegistry] Loaded {_registry.Count} buildings"); GD.Print($"[BuildingRegistry] Loaded {_registry.Count} buildings");
} }
public PackedScene GetScene(string id) public BuildingData GetBuilding(string id)
{ {
_registry.TryGetValue(id, out var scene); _registry.TryGetValue(id, out var data);
return scene; return data;
} }
} }

View File

@@ -1,31 +1,68 @@
#nullable enable #nullable enable
using System;
using System.Collections.Generic; using System.Collections.Generic;
using Godot; using Godot;
namespace AceFieldNewHorizon.Scripts.System; namespace AceFieldNewHorizon.Scripts.System;
public enum GridLayer
{
Ground, // Base layer (e.g., terrain, floors)
Building, // Main building layer
Decoration // Additional layer for decorations, effects, etc.
}
public partial class GridManager : Node public partial class GridManager : Node
{ {
private Dictionary<Vector2I, Node2D> _grid = new(); private Dictionary<GridLayer, Dictionary<Vector2I, Node2D>> _layers = new();
public bool IsCellFree(Vector2I cell) public GridManager()
{ {
return !_grid.ContainsKey(cell); // Initialize all layers
foreach (GridLayer layer in Enum.GetValues(typeof(GridLayer)))
{
_layers[layer] = new Dictionary<Vector2I, Node2D>();
}
} }
public void OccupyCell(Vector2I cell, Node2D building) public bool IsCellFree(Vector2I cell, GridLayer layer = GridLayer.Building)
{ {
_grid[cell] = building; return !_layers[layer].ContainsKey(cell);
} }
public void FreeCell(Vector2I cell) public void OccupyCell(Vector2I cell, Node2D building, GridLayer layer = GridLayer.Building)
{ {
_grid.Remove(cell); _layers[layer][cell] = building;
} }
public Node2D? GetBuildingAtCell(Vector2I cell) public void FreeCell(Vector2I cell, GridLayer layer = GridLayer.Building)
{ {
return _grid.GetValueOrDefault(cell); if (_layers[layer].ContainsKey(cell))
_layers[layer].Remove(cell);
}
public Node2D? GetBuildingAtCell(Vector2I cell, GridLayer layer = GridLayer.Building)
{
return _layers[layer].GetValueOrDefault(cell);
}
public bool IsAnyCellOccupied(Vector2I cell, params GridLayer[] layers)
{
if (layers.Length == 0)
{
// Check all layers if none specified
foreach (var layer in _layers.Values)
{
if (layer.ContainsKey(cell)) return true;
}
return false;
}
foreach (var layer in layers)
{
if (_layers[layer].ContainsKey(cell)) return true;
}
return false;
} }
} }

View File

@@ -1,3 +1,4 @@
using System;
using AceFieldNewHorizon.Scripts.Tiles; using AceFieldNewHorizon.Scripts.Tiles;
using Godot; using Godot;
@@ -9,13 +10,15 @@ public partial class PlacementManager : Node2D
[Export] public BuildingRegistry Registry { get; set; } [Export] public BuildingRegistry Registry { get; set; }
private string _currentBuildingId = "wall"; private string _currentBuildingId = "wall";
private GridLayer _currentLayer = GridLayer.Building; // Default layer
private Vector2I _hoveredCell; private Vector2I _hoveredCell;
private BaseTile _ghostBuilding; private BaseTile _ghostBuilding;
private float _currentRotation = 0f;
public void SetCurrentBuilding(string buildingId) public void SetCurrentBuilding(string buildingId, GridLayer layer = GridLayer.Building)
{ {
_currentBuildingId = buildingId; _currentBuildingId = buildingId;
_currentLayer = layer;
// Replace ghost immediately // Replace ghost immediately
if (_ghostBuilding == null) return; if (_ghostBuilding == null) return;
@@ -23,19 +26,48 @@ public partial class PlacementManager : Node2D
_ghostBuilding = null; _ghostBuilding = null;
} }
public void SetCurrentLayer(GridLayer layer)
{
_currentLayer = layer;
// Update ghost building if needed
if (_ghostBuilding != null)
{
_ghostBuilding.QueueFree();
_ghostBuilding = null;
}
}
private void RotateGhost(bool reverse = false)
{
if (_ghostBuilding == null) return;
if (reverse)
_currentRotation = (_currentRotation - 90f) % 360f;
else
_currentRotation = (_currentRotation + 90f) % 360f;
_ghostBuilding.RotationDegrees = _currentRotation;
}
public override void _Process(double delta) public override void _Process(double delta)
{ {
// Snap mouse to grid // Snap mouse to grid
var mousePos = GetGlobalMousePosition(); var mousePos = GetGlobalMousePosition();
_hoveredCell = GridUtils.WorldToGrid(mousePos); _hoveredCell = GridUtils.WorldToGrid(mousePos);
if (Input.IsActionJustPressed("rotate_tile_reverse"))
RotateGhost(reverse: true);
else if (Input.IsActionJustPressed("rotate_tile"))
RotateGhost();
if (_ghostBuilding == null) if (_ghostBuilding == null)
{ {
var scene = Registry.GetScene(_currentBuildingId); var scene = Registry.GetBuilding(_currentBuildingId)?.Scene;
if (scene == null) return; if (scene == null) return;
_ghostBuilding = (BaseTile)scene.Instantiate(); _ghostBuilding = (BaseTile)scene.Instantiate();
_ghostBuilding.SetGhostMode(true); _ghostBuilding.SetGhostMode(true);
_ghostBuilding.RotationDegrees = _currentRotation;
_ghostBuilding.ZAsRelative = false;
_ghostBuilding.ZIndex = (int)_currentLayer; // Use layer as Z-index
AddChild(_ghostBuilding); AddChild(_ghostBuilding);
} }
@@ -48,12 +80,14 @@ public partial class PlacementManager : Node2D
Position = centerPos, Position = centerPos,
CollideWithBodies = true, CollideWithBodies = true,
CollideWithAreas = true, CollideWithAreas = true,
CollisionMask = uint.MaxValue // check against all layers/masks CollisionMask = uint.MaxValue
// Exclude = new Godot.Collections.Array<Rid>() // optional, see below
}; };
var collision = spaceState.IntersectPoint(query, 8); var collision = spaceState.IntersectPoint(query, 8);
var canPlace = Grid.IsCellFree(_hoveredCell) && collision.Count == 0;
// Check if the current cell is free in the current layer
var canPlace = Grid.IsCellFree(_hoveredCell, _currentLayer) &&
!Grid.IsAnyCellOccupied(_hoveredCell, GetBlockingLayers());
_ghostBuilding.Position = placementPos; _ghostBuilding.Position = placementPos;
_ghostBuilding.SetGhostMode(canPlace); _ghostBuilding.SetGhostMode(canPlace);
@@ -61,24 +95,47 @@ public partial class PlacementManager : Node2D
// Left click to place // Left click to place
if (Input.IsActionPressed("build_tile") && canPlace) if (Input.IsActionPressed("build_tile") && canPlace)
{ {
var scene = Registry.GetScene(_currentBuildingId); var scene = Registry.GetBuilding(_currentBuildingId)?.Scene;
if (scene == null) return; if (scene == null) return;
_ghostBuilding.FinalizePlacement(); _ghostBuilding.FinalizePlacement();
Grid.OccupyCell(_hoveredCell, _ghostBuilding); _ghostBuilding.RotationDegrees = _currentRotation;
_ghostBuilding.ZIndex = (int)_currentLayer;
var buildingData = Registry.GetBuilding(_currentBuildingId);
Grid.OccupyCell(_hoveredCell, _ghostBuilding, _currentLayer);
if (buildingData is { BuildTime: > 0f })
_ghostBuilding.StartConstruction(buildingData.BuildTime);
// Create new ghost for next placement
_ghostBuilding = (BaseTile)scene.Instantiate(); _ghostBuilding = (BaseTile)scene.Instantiate();
_ghostBuilding.SetGhostMode(true); _ghostBuilding.SetGhostMode(true);
_ghostBuilding.RotationDegrees = _currentRotation;
_ghostBuilding.ZAsRelative = false;
_ghostBuilding.ZIndex = (int)_currentLayer;
AddChild(_ghostBuilding); AddChild(_ghostBuilding);
} }
if (Input.IsActionPressed("destroy_tile") && !Grid.IsCellFree(_hoveredCell)) if (Input.IsActionPressed("destroy_tile") && !Grid.IsCellFree(_hoveredCell, _currentLayer))
{ {
// Right click to destroy // Right click to destroy from current layer
var building = Grid.GetBuildingAtCell(_hoveredCell); var building = Grid.GetBuildingAtCell(_hoveredCell, _currentLayer);
if (building == null) return; if (building == null) return;
building.QueueFree(); building.QueueFree();
Grid.FreeCell(_hoveredCell); Grid.FreeCell(_hoveredCell, _currentLayer);
} }
} }
// Define which layers should block placement
private GridLayer[] GetBlockingLayers()
{
return _currentLayer switch
{
GridLayer.Ground => new[] { GridLayer.Ground },
GridLayer.Building => new[] { GridLayer.Ground, GridLayer.Building },
GridLayer.Decoration => new[] { GridLayer.Ground, GridLayer.Building, GridLayer.Decoration },
_ => []
};
}
} }

View File

@@ -1,45 +1,75 @@
using System.Numerics;
using AceFieldNewHorizon.Scripts.System;
using Godot; using Godot;
using Vector2 = Godot.Vector2;
namespace AceFieldNewHorizon.Scripts.Tiles namespace AceFieldNewHorizon.Scripts.Tiles;
public partial class BaseTile : Node2D
{ {
public partial class BaseTile : Node2D private CollisionShape2D _collisionShape;
private Sprite2D _sprite;
private ColorRect _progressOverlay;
public override void _Ready()
{ {
private CollisionShape2D _collisionShape; _collisionShape = GetNodeOrNull<CollisionShape2D>("CollisionShape2D");
private Sprite2D _sprite; _sprite = GetNodeOrNull<Sprite2D>("Sprite2D");
_progressOverlay = GetNodeOrNull<ColorRect>("ProgressOverlay");
if (_progressOverlay != null)
_progressOverlay.Visible = false;
}
public override void _Ready() public void SetGhostMode(bool canPlace)
{
if (_collisionShape != null)
_collisionShape.Disabled = true;
if (_sprite != null)
_sprite.Modulate = canPlace
? new Color(0, 1, 0, 0.5f)
: new Color(1, 0, 0, 0.5f);
}
public void FinalizePlacement()
{
if (_collisionShape != null)
_collisionShape.Disabled = false;
if (_sprite != null)
_sprite.Modulate = Colors.White;
}
// Building progress visualization
public void StartConstruction(float buildTime)
{
if (_progressOverlay == null || _sprite?.Texture == null) return;
var texSize = new Vector2(GridUtils.TileSize, GridUtils.TileSize);
_progressOverlay.Visible = true;
_progressOverlay.Color = new Color(0, 0, 1, 0.4f); // semi-transparent blue
async void RunProgress()
{ {
_collisionShape = GetNodeOrNull<CollisionShape2D>("CollisionShape2D"); var elapsed = 0f;
_sprite = GetNodeOrNull<Sprite2D>("Sprite2D"); while (elapsed < buildTime)
}
/// <summary>
/// Switch between ghost and placed mode.
/// </summary>
/// <param name="canPlace">If in ghost mode, true = green, false = red. If placed, always white.</param>
public void SetGhostMode(bool canPlace)
{
if (_collisionShape != null)
_collisionShape.Disabled = true; // always disabled in ghost mode
if (_sprite != null)
{ {
// Ghost preview coloring await ToSignal(GetTree(), SceneTree.SignalName.ProcessFrame);
_sprite.Modulate = canPlace ? new Color(1, 1, 1, 0.2f) : // white semi-transparent elapsed += (float)GetProcessDeltaTime();
new Color(1, 0, 0, 0.2f); // red semi-transparent
var ratio = Mathf.Clamp(elapsed / buildTime, 0, 1);
// Fill from bottom to top, aligned with sprite center pivot
_progressOverlay.Size = new Vector2(texSize.X, texSize.Y * ratio);
_progressOverlay.Position = new Vector2(
-texSize.X / 2, // align left edge
texSize.Y / 2 - _progressOverlay.Size.Y // move upward
);
} }
_progressOverlay.Visible = false;
} }
/// <summary> RunProgress();
/// Call when placement is finalized.
/// </summary>
public void FinalizePlacement()
{
if (_collisionShape != null)
_collisionShape.Disabled = false;
if (_sprite != null)
_sprite.Modulate = Colors.White; // reset to normal
}
} }
} }

View File

@@ -0,0 +1,8 @@
using Godot;
namespace AceFieldNewHorizon.Scripts.Tiles;
public partial class MinerTile : BaseTile
{
}

View File

@@ -0,0 +1 @@
uid://dyubkyqtpcg3a

View File

@@ -55,6 +55,21 @@ destroy_tile={
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":2,"position":Vector2(481, 42),"global_position":Vector2(500, 138),"factor":1.0,"button_index":2,"canceled":false,"pressed":true,"double_click":false,"script":null) "events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":2,"position":Vector2(481, 42),"global_position":Vector2(500, 138),"factor":1.0,"button_index":2,"canceled":false,"pressed":true,"double_click":false,"script":null)
] ]
} }
rotate_tile={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":79,"key_label":0,"unicode":111,"location":0,"echo":false,"script":null)
]
}
rotate_tile_reverse={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":79,"key_label":0,"unicode":79,"location":0,"echo":false,"script":null)
]
}
move_sprint={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194325,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
[rendering] [rendering]