Пример #1
0
        protected override void ReadAttribute(string key, string value)
        {
            switch (key)
            {
            case "Region":
                this.Region = (ERegionType)value.ToInt32();
                break;

            case "Affect":
                this.Affect = (EAffect)value.ToInt32();
                break;

            case "LifeTime":
                this.LifeTime = value.ToFloat();
                break;

            case "MaxCount":
                this.MaxCount = value.ToInt32();
                break;

            case "JudgeName":
                this.JudgeName = value;
                break;
            }
        }
Пример #2
0
        protected override void ReadAttribute(string key, string value)
        {
            switch (key)
            {
            case "Affect":
                this.Affect = (EAffect)value.ToInt32();
                break;

            case "BuffID":
                this.BuffID = value.ToInt32();
                break;

            case "Ratio":
                this.Ratio = value.ToFloat();
                break;
            }
        }
Пример #3
0
    public List <Actor> GetActorsByAffectType(EAffect type)
    {
        switch (type)
        {
        //case EAffect.Ally:
        //    return GetAllAlly();
        //case EAffect.Host:
        //    if (mHost == null)
        //    {
        //        return null;
        //    }
        //    else
        //    {
        //        return new List<Actor>() { mHost };
        //    }
        case EAffect.Enem:
            return(GetAllEnemy());

        //case EAffect.Boss:
        //    List<Actor> list = new List<Actor>();
        //    List<Actor> enemys = GetAllEnemy();
        //    for (int i = 0; i < enemys.Count; i++)
        //    {
        //        Actor monster = enemys[i];
        //        if (monster.ActorType == EActorType.MONSTER)
        //        {
        //            if (monster.IsBoss())
        //            {
        //                list.Add(monster);
        //            }
        //        }
        //    }
        //    return list;
        //case EAffect.Self:
        //    return new List<Actor>() { this };
        //case EAffect.Each:
        //    return LevelData.AllActors;
        default:
            return(new List <Actor>());
        }
    }
Пример #4
0
 public override void Read(string[] array)
 {
     this.Type   = (EAffect)CfgObj.ReadInt32(Get(0, array));
     this.Policy = (ESelectTargetPolicy)CfgObj.ReadInt32(Get(1, array));
     this.MaxNum = CfgObj.ReadInt32(Get(2, array));
 }