Пример #1
0
        //---------------------------------------------------
        // 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);
            }
        }
Пример #2
0
 public ActorData(Define.ActorType type, Actor actor)
 {
     this.Type  = type;
     this.Actor = actor;
 }
Пример #3
0
        //---------------------------------------------------
        // AddActor
        //---------------------------------------------------
        public int AddActor(Actor actor, Define.ActorType type)
        {
            _actorList.Add(_currentIndex, new ActorData(type, actor));

            return(_currentIndex++);
        }