Beispiel #1
0
        public void CreateActor(string ActorId)
        {
            BattleActor actor = WorldTemplateCreater.GetBattleActor();

            actor.ActorId = ActorId;
            _BattleActors.Add(actor.ActorId, actor);
        }
Beispiel #2
0
        public BattleActor GetActor(string actorid)
        {
            BattleActor ret = null;

            _BattleActors.TryGetValue(actorid, out ret);

            return(ret);
        }
Beispiel #3
0
        public static BattleActor GetBattleActor()
        {
            BattleActor ret = new BattleActor();

            ret.ActorId = Guid.NewGuid().ToString();
            ret.Hp      = BattleActorTemplate.GetHP();
            ret.Mp      = BattleActorTemplate.GetMP();
            ret.Att     = BattleActorTemplate.GetATT();
            ret.Def     = BattleActorTemplate.GetDEF();
            ret.Speed   = BattleActorTemplate.GetSpeed();

            return(ret);
        }
Beispiel #4
0
        public void InitLandEvent(MapEventType type)
        {
            switch (type)
            {
            case MapEventType.Fight:
            {
                //创建战斗对象
                _Enemy = WorldTemplateCreater.GetBattleActor();

                break;
            }
            }
        }
Beispiel #5
0
 public void AddActor(BattleActor actor)
 {
     _BattleActors.Add(actor.ActorId, actor);
 }