Beispiel #1
0
 protected override void OnLoadFromText(MapObjectConfigReference reference)
 {
     base.OnLoadFromText(reference);
     aiRefid    = reference.aiRefid;
     patrolType = (PatrolType)System.Enum.Parse(typeof(PatrolType), reference.patrolType);//PatrolTypeParse( vNode.GetAttribute( "patrolType") );
     teamID     = reference.teamID;
     LoadRoutes(reference.route);
     OnLoadComplete();
 }
Beispiel #2
0
 public MPObject()
 {
     mocReference_             = new MapObjectConfigReference();
     mocReference_.available   = true;
     mocReference_.direction   = GameUtility.VectorToStr(Vector3.zero);
     mocReference_.aiRefid     = 0;
     mocReference_.camp        = CampType.D;
     mocReference_.isRole      = true;
     mocReference_.map         = 0;
     mocReference_.Name        = "";
     mocReference_.patrolType  = "fix";
     mocReference_.position    = GameUtility.VectorToStr(Vector3.zero);
     mocReference_.refid       = 0;
     mocReference_.route       = "";
     mocReference_.sn          = 0;
     mocReference_.teamID      = -1;
     mocReference_.EditionType = EditionType.COMMON;
 }
Beispiel #3
0
 public void LoadFromText(MapObjectConfigReference reference)
 {
     this.available   = reference.available;
     this.sn          = reference.sn;
     this.map         = reference.map;
     this.refid       = reference.refid;
     this.position    = GameUtility.StrToVector3(reference.position);
     this.direction   = GameUtility.StrToVector3(reference.direction);
     this.editionType = (ObjectEditionType)((int)reference.EditionType);
     this.camp        = (ObjectCamp)(reference.camp);
     //这里做一次ID的检测,是否跟约定一致
     mocReference_.ID = reference.ID;
     if (mocReference_.ID != this.map * 10000 + this.sn)
     {
         Debug.Log("Error, ID != map *10000 + sn");
         throw new System.Exception("Error, ID != map *10000 + sn");
     }
     OnLoadFromText(reference);
 }
Beispiel #4
0
 protected override void OnLoadFromText(MapObjectConfigReference reference)
 {
     base.OnLoadFromText(reference);
     OnLoadComplete();
 }
Beispiel #5
0
 protected virtual void OnLoadFromText(MapObjectConfigReference reference)
 {
 }