コード例 #1
0
 protected Spell(Character source, GameWorld gameWorld, int range)
 {
     Source = source;
     GameWorld = gameWorld;
     Range = range;
     Init();
 }
コード例 #2
0
 public SpellShieldNova(Character source, GameWorld gameWorld, int range)
     : base(source, gameWorld, range)
 {
     Image = Properties.Resources.SpellNova;
     DrawBehavior.IsCircle = true;
     MotionBehavior = new StationaryMotionBehavior(this, gameWorld);
 }
コード例 #3
0
 public Frostball(Character source, GameWorld gameWorld, int range)
     : base(source, gameWorld, range)
 {
     Image = Properties.Resources.Frostbolt_small;
     if(!SpellHandler.Cooldowns.ContainsKey(typeof(IceGround)))
         SpellHandler.Cooldowns.Add(typeof(IceGround), new Cooldown(0));
 }
コード例 #4
0
 public SpellTree(Character character)
 {
     this.character = character;
     AttackMap = new Dictionary<Type, Func<Spell>>();
     spells = new Dictionary<Type, int>();
     LoadSpells();
 }
コード例 #5
0
 public IceGround(Character source, GameWorld gameWorld, int range) : base(source, gameWorld, range)
 {
     Image = Properties.Resources.IceGround;
     this.MotionBehavior = new StationaryMotionBehavior(this, gameWorld);
     Paralax = Paralax.Background;
     affectedCharacters = new List<Character>();
     Cost = 0;
     gameWorld.Split += gameWorld_Split;
     SlowPercentage = 25;
     Exit();
 }
コード例 #6
0
 public SpellHandler(GameWorld gameWorld, Character source)
 {
     this.GameWorld = gameWorld;
     this.Source = source;
     Init();
 }
コード例 #7
0
 public NormalDamageBehavior(Character source, IEnumerable<Type> targetTypes, int damage)
 {
     Damage = damage;
     this.Source = source;
     this.TargetTypes = targetTypes.ToList();
 }
コード例 #8
0
 public Lightningbolt(Character source, GameWorld gameWorld, int range)
     : base(source, gameWorld, range)
 {
 }
コード例 #9
0
 public Fireball(Character source, GameWorld gameWorld, int range)
     : base(source, gameWorld, range)
 {
     Image = Properties.Resources.Fireball;
 }
コード例 #10
0
 public void TakeDamage(IDamageBehavior damageBehavior, Character source)
 {
     Health.Use(damageBehavior.Damage);
     if (Health.Current <= 0) Killed(this, source);
 }