//--------------------------------------------------- // Initialize //--------------------------------------------------- protected void Initialize(Define.ActorType actorType, ActorModel model, ActorView actorView) { int actorId = ApplicationManager.Instance.ActorManager.AddActor(this, actorType); _actorModel = model; _actorModel.AddListerner(this); _actorModel.ActorId = actorId; if (actorView != null) { _actorView = actorView; _actorModel.AddListerner(_actorView); } }
public ActorData(Define.ActorType type, Actor actor) { this.Type = type; this.Actor = actor; }
//--------------------------------------------------- // AddActor //--------------------------------------------------- public int AddActor(Actor actor, Define.ActorType type) { _actorList.Add(_currentIndex, new ActorData(type, actor)); return(_currentIndex++); }