示例#1
0
 public Hitbox_Gameplay(GameplayEnums.HitboxType _boxType, int _position, int _width, int _remainingTime = -1) : this()
 {
     HitboxType    = _boxType;
     Position      = _position;
     Width         = _width;
     RemainingTime = _remainingTime;
 }
示例#2
0
 public Hitbox_Gameplay(Hitbox_Gameplay _other)
 {
     HitboxType       = _other.HitboxType;
     Position         = _other.Position;
     Width            = _other.Width;
     RemainingTime    = _other.RemainingTime;
     HasStruck        = _other.HasStruck;
     ID               = ID_Counter++;
     AttackAttribute  = _other.AttackAttribute;
     HurtboxAttribute = _other.HurtboxAttribute;
 }
示例#3
0
 public Hitbox_Gameplay()
 {
     HitboxType       = GameplayEnums.HitboxType.Hitbox_Attack;
     Position         = 0;
     Width            = 0;
     RemainingTime    = -1;
     HasStruck        = false;
     ID               = ID_Counter++;
     AttackAttribute  = GameplayEnums.AttackAttribute.NotAttack;
     HurtboxAttribute = GameplayEnums.HurtboxAttribute.Normal;
 }
示例#4
0
    public void ModifyHitbox(List <Hitbox_Gameplay> _hitboxes, int _length, GameplayEnums.HitboxType _hitboxType = GameplayEnums.HitboxType.Hurtbox_Limb)
    {
        Hitbox_Gameplay hbox = _hitboxes.Find(o => o.HitboxType == _hitboxType);

        hbox.Width = _length;
        if (FacingRight)
        {
            hbox.Position = GameplayConstants.CHARACTER_HURTBOX_WIDTH / 2 + _length / 2;
        }
        else
        {
            hbox.Position = GameplayConstants.CHARACTER_HURTBOX_WIDTH / -2 - _length / 2;
        }
    }
示例#5
0
    public Hitbox_Gameplay CreateHitbox(GameplayEnums.HitboxType _boxType, int _width)
    {
        Hitbox_Gameplay box = new Hitbox_Gameplay();

        box.HitboxType = _boxType;
        box.Width      = _width;
        if (FacingRight)
        {
            box.Position = GameplayConstants.CHARACTER_HURTBOX_WIDTH / 2 + _width / 2;
        }
        else
        {
            box.Position = GameplayConstants.CHARACTER_HURTBOX_WIDTH / -2 - _width / 2;
        }
        return(box);
    }