split SimpleTeleport into it's own file

This commit is contained in:
Matthias Mailänder
2014-11-30 18:39:05 +01:00
parent 8f076131c8
commit 253dfcac29
3 changed files with 29 additions and 14 deletions

View 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;
}
}
}

View File

@@ -117,18 +117,4 @@ namespace OpenRA.Mods.RA.Activities
return null; 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;
}
}
} }

View File

@@ -453,6 +453,7 @@
<Compile Include="Lint\CheckMapRules.cs" /> <Compile Include="Lint\CheckMapRules.cs" />
<Compile Include="Activities\Air\HeliFlyCircle.cs" /> <Compile Include="Activities\Air\HeliFlyCircle.cs" />
<Compile Include="Render\Hovers.cs" /> <Compile Include="Render\Hovers.cs" />
<Compile Include="Activities\SimpleTeleport.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj"> <ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">