split SimpleTeleport into it's own file
This commit is contained in:
28
OpenRA.Mods.RA/Activities/SimpleTeleport.cs
Executable file
28
OpenRA.Mods.RA/Activities/SimpleTeleport.cs
Executable file
@@ -0,0 +1,28 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see COPYING.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public class SimpleTeleport : Activity
|
||||
{
|
||||
CPos destination;
|
||||
|
||||
public SimpleTeleport(CPos destination) { this.destination = destination; }
|
||||
|
||||
public override Activity Tick(Actor self)
|
||||
{
|
||||
self.Trait<IPositionable>().SetPosition(self, destination);
|
||||
self.Generation++;
|
||||
return NextActivity;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,18 +117,4 @@ namespace OpenRA.Mods.RA.Activities
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public class SimpleTeleport : Activity
|
||||
{
|
||||
CPos destination;
|
||||
|
||||
public SimpleTeleport(CPos destination) { this.destination = destination; }
|
||||
|
||||
public override Activity Tick(Actor self)
|
||||
{
|
||||
self.Trait<IPositionable>().SetPosition(self, destination);
|
||||
self.Generation++;
|
||||
return NextActivity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -453,6 +453,7 @@
|
||||
<Compile Include="Lint\CheckMapRules.cs" />
|
||||
<Compile Include="Activities\Air\HeliFlyCircle.cs" />
|
||||
<Compile Include="Render\Hovers.cs" />
|
||||
<Compile Include="Activities\SimpleTeleport.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
|
||||
|
||||
Reference in New Issue
Block a user