INotifyCreated

This commit is contained in:
atlimit8
2014-07-24 19:41:01 -05:00
parent 027887aa13
commit 0319b8cbda
2 changed files with 3 additions and 0 deletions

View File

@@ -188,6 +188,8 @@ namespace OpenRA
public Actor CreateActor(bool addToWorld, string name, TypeDictionary initDict)
{
var a = new Actor(this, name, initDict);
foreach (var t in a.TraitsImplementing<INotifyCreated>())
t.Created(a);
if (addToWorld)
Add(a);
return a;