Using the building footprint, the placement overlay is offset from the cursor so the cursor is in the approximate middle of the overlay (not precisely due to overlay snapping to tiles). The tile size (24) was used as a magic number in a lot of places, they have been replaced with Game.CellSize.
23 lines
389 B
C#
23 lines
389 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace OpenRa.Game.Traits
|
|
{
|
|
class Turreted : ITick // temporary.
|
|
{
|
|
public int turretFacing = Game.CellSize;
|
|
|
|
public Turreted(Actor self)
|
|
{
|
|
}
|
|
|
|
// temporary.
|
|
public void Tick(Actor self, Game game, int dt)
|
|
{
|
|
turretFacing = (turretFacing + 1) % 32;
|
|
}
|
|
}
|
|
}
|