ActorInitializer, in preparation for next change (bob)

This commit is contained in:
Chris Forbes
2010-06-19 14:28:30 +12:00
parent 572cdc9dbf
commit db465e1fdd
106 changed files with 174 additions and 227 deletions

View File

@@ -24,14 +24,12 @@ using OpenRA.Traits;
namespace OpenRA.Mods.RA
{
class CrateSpawnerInfo : ITraitInfo
class CrateSpawnerInfo : TraitInfo<CrateSpawner>
{
public readonly int Minimum = 1; // Minumum number of crates
public readonly int Maximum = 255; // Maximum number of crates
public readonly int SpawnInterval = 180; // Average time (seconds) between crate spawn
public readonly float WaterChance = .2f; // Chance of generating a water crate instead of a land crate
public object Create(Actor self) { return new CrateSpawner(); }
}
// assumption: there is always at least one free water cell, and one free land cell.