Replace IActorInit with an abstract class.
A shared ValueActorInit<T> is introduced to reduce duplication in the most common init cases, and an ActorInitActorReference allow actors to be referenced by map.yaml name.
This commit is contained in:
@@ -95,13 +95,9 @@ namespace OpenRA.Mods.Cnc.Traits.Render
|
||||
}
|
||||
}
|
||||
|
||||
public class BodyAnimationFrameInit : IActorInit<uint>
|
||||
public class BodyAnimationFrameInit : ValueActorInit<uint>
|
||||
{
|
||||
[FieldFromYamlKey]
|
||||
readonly uint value = 0;
|
||||
|
||||
public BodyAnimationFrameInit() { }
|
||||
public BodyAnimationFrameInit(uint init) { value = init; }
|
||||
public uint Value { get { return value; } }
|
||||
public BodyAnimationFrameInit(uint value)
|
||||
: base(value) { }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user