public void Spawn(Vector3 position, Quaternion rotation, TargetPoint target) { var oldTarget = this.target; this.target = target; try { spawner.Spawn(position, rotation); } finally { this.target = oldTarget; } }
public void CommandAttack(RosemaryUnit other) { var units = controllableUnits; foreach (var unit in units) { unit.CommandAttack(other); } if (units.Any()) { attackCommandEffectSpawner.Spawn( other.centre, Quaternion.identity, TargetPoint.Transform(other.centreTransform)); } }
public static TargetPoint NoneWith(TargetPoint other) => new TargetPoint(Mode.None, other);
public TargetPoint(Mode mode, TargetPoint other) { this.mode = mode; transform = other.transform; point = other.point; }