private void AddHurtbox(float damage, HurtboxTypes hurtboxType) { if (hurtboxType == HurtboxTypes.GroundPound) { var hurtbox = GroundPound.Clone() as GroundPound; hurtbox.Position = this.Position + this._velocity; hurtbox.HurtboxType = hurtboxType; hurtbox.Colour = this.Colour; hurtbox.Layer = 0.3f; hurtbox.LifeSpan = 0.10f; hurtbox.Velocity = new Vector2(0f, 0f); hurtbox.Parent = this; hurtbox.Damage = damage; Children.Add(hurtbox); } if (hurtboxType == HurtboxTypes.FireWhirl) { var hurtbox = FireWhirl.Clone() as FireWhirl; hurtbox.Position = this.Position + this._velocity; hurtbox.HurtboxType = hurtboxType; hurtbox.Colour = this.Colour; hurtbox.Layer = 0.3f; hurtbox.LifeSpan = 0.01f; hurtbox.Velocity = new Vector2(0f, 0f); hurtbox.Parent = this; hurtbox.Damage = damage; Children.Add(hurtbox); } }
protected override void AddHurtbox(float damage, HurtboxTypes hurtboxType) { if (hurtboxType == HurtboxTypes.Torch) { var hurtbox = Torch.Clone() as Torch; hurtbox.Position = this.Position + this._velocity + new Vector2(0f, -50f); hurtbox.HurtboxType = hurtboxType; hurtbox.Colour = this.Colour; hurtbox.Layer = 0.2f; hurtbox.LifeSpan = 1f; hurtbox.Parent = this; hurtbox.Target = Target; hurtbox.Damage = damage; hurtbox.Speed = 10f; Children.Add(hurtbox); } if (hurtboxType == HurtboxTypes.ShadowWhirl) { var hurtbox = ShadowWhirl.Clone() as ShadowWhirl; hurtbox.Position = this.Position + this._velocity; hurtbox.HurtboxType = hurtboxType; hurtbox.Colour = this.Colour; hurtbox.Layer = 0.2f; hurtbox.LifeSpan = 0.01f; hurtbox.Velocity = new Vector2(0f, 0f); hurtbox.Parent = this; hurtbox.Damage = damage; Children.Add(hurtbox); } if (hurtboxType == HurtboxTypes.Spirit) { var hurtbox = Spirit.Clone() as Spirit; hurtbox.Position = this.Position + this._velocity + new Vector2(0f, -50f); hurtbox.HurtboxType = hurtboxType; hurtbox.Colour = this.Colour; hurtbox.Layer = 0.2f; hurtbox.LifeSpan = 4.5f; hurtbox.Parent = this; hurtbox.Target = Target; hurtbox.Damage = damage; hurtbox.Speed = 1f; Children.Add(hurtbox); } }
protected virtual void AddHurtbox(float damage, HurtboxTypes hurtboxType) { var hurtbox = Hurtbox.Clone() as Hurtbox; hurtbox.Position = this.Position + this._velocity; hurtbox.HurtboxType = hurtboxType; hurtbox.Colour = this.Colour; hurtbox.Layer = 0.2f; hurtbox.LifeSpan = 0.1f; hurtbox.Velocity = new Vector2(0f, 0f); hurtbox.Parent = this; hurtbox.Damage = damage; Children.Add(hurtbox); }
protected override void AddHurtbox(float damage, HurtboxTypes hurtboxType) { if (hurtboxType == HurtboxTypes.ShadowWhirl) { var hurtbox = ShadowWhirl.Clone() as ShadowWhirl; hurtbox.Position = this.Position + this._velocity; hurtbox.HurtboxType = hurtboxType; hurtbox.Colour = this.Colour; hurtbox.Layer = 0.2f; hurtbox.LifeSpan = 0.01f; hurtbox.Velocity = new Vector2(0f, 0f); hurtbox.Parent = this; hurtbox.Damage = damage; Children.Add(hurtbox); } }
protected override void AddHurtbox(float damage, HurtboxTypes hurtboxType) { if (hurtboxType == HurtboxTypes.Dart) { var hurtbox = Dart.Clone() as Dart; hurtbox.Position = this.Position + this._velocity + new Vector2(0f, -10f); hurtbox.HurtboxType = hurtboxType; hurtbox.Colour = this.Colour; hurtbox.Layer = 0.2f; hurtbox.LifeSpan = 1.0f; hurtbox.Parent = this; hurtbox.Target = Target; hurtbox.Damage = damage; hurtbox.Speed = 25f; Children.Add(hurtbox); } }
protected override void AddHurtbox(float damage, HurtboxTypes hurtboxType) { if (hurtboxType == HurtboxTypes.Torch) { var hurtbox = Torch.Clone() as Torch; hurtbox.Position = this.Position; hurtbox.Velocity = RotateVector(new Vector2(0, 1), _vectorRotation); hurtbox.HurtboxType = hurtboxType; hurtbox.Colour = this.Colour; hurtbox.Layer = 0.2f; hurtbox.LifeSpan = 0.25f; hurtbox.Parent = this; hurtbox.Target = null; hurtbox.Damage = damage; hurtbox.Speed = 30f; Children.Add(hurtbox); hurtbox = Torch.Clone() as Torch; hurtbox.Position = this.Position; hurtbox.Velocity = RotateVector(new Vector2(0, -1), _vectorRotation); hurtbox.HurtboxType = hurtboxType; hurtbox.Colour = this.Colour; hurtbox.Layer = 0.2f; hurtbox.LifeSpan = 0.25f; hurtbox.Parent = this; hurtbox.Target = null; hurtbox.Damage = damage; hurtbox.Speed = 30f; Children.Add(hurtbox); //hurtbox = Torch.Clone() as Torch; //hurtbox.Position = this.Position; //hurtbox.Velocity = RotateVector(new Vector2(1, 0), _vectorRotation); //hurtbox.HurtboxType = hurtboxType; //hurtbox.Colour = this.Colour; //hurtbox.Layer = 0.2f; //hurtbox.LifeSpan = 1.5f; //hurtbox.Parent = this; //hurtbox.Target = null; //hurtbox.Damage = damage; //hurtbox.Speed = 10f; //Children.Add(hurtbox); //hurtbox = Torch.Clone() as Torch; //hurtbox.Position = this.Position; //hurtbox.Velocity = RotateVector(new Vector2(-1, 0), _vectorRotation); //hurtbox.HurtboxType = hurtboxType; //hurtbox.Colour = this.Colour; //hurtbox.Layer = 0.2f; //hurtbox.LifeSpan = 1.5f; //hurtbox.Parent = this; //hurtbox.Target = null; //hurtbox.Damage = damage; //hurtbox.Speed = 10f; //Children.Add(hurtbox); } }