Beispiel #1
0
        public void StartLoad()
        {
            ActorProfessional rProfessional = GameConfig.Instance.GetActorProfessional(this.ProfessionalID);

            this.Parent.ProfessionalDesc.text = rProfessional.Desc;
            mActorCreateRequest = ActorCreater.CreateActor(-1, rProfessional.HeroID, ActorLoadCompleted);
        }
Beispiel #2
0
 public void OnValueChanged()
 {
     if (this.SelectedToggle.isOn && this.Parent.SelectedPlayerItem != this)
     {
         StopLoad();
         Account.Instance.ActiveActor   = this.mNetActor;
         this.Parent.SelectedPlayerItem = this;
         ActorProfessional rProfessional = GameConfig.Instance.GetActorProfessional(this.mNetActor.ProfessionalID);
         mActorCreateRequest = ActorCreater.CreateActor(this.mNetActor.ActorID, rProfessional.HeroID, ActorLoadCompleted);
     }
     else if (!this.SelectedToggle.isOn)
     {
         ActorCreater.DestoryActor(mActorCreateRequest.Hero.ID);
         UtilTool.SafeDestroy(mActorCreateRequest.ActorGo);
         mActorCreateRequest.Stop();
     }
 }