blob: 704dd4f06cad90b2c19a9f1c84f834370fd98f38 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
using Godot;
using System;
public partial class MovementAction : DirectionalAction
{
public MovementAction(Actor actor, Vector2I offset) : base(actor, offset)
{
}
public override void Perform()
{
Vector2I finalDestination = actor.GridPosition + Offset;
if (!Map_Data.IsTileWalkable(finalDestination)) return;
if (GetBlockingActorAtPosition(finalDestination) != null) return;
GD.Print("What?");
actor.Walk(Offset);
}
}
|