Ejemplo n.º 1
0
        public override void Initialize(GameObject owner, Transform directionOwner, int team,
                                        BoxShapes shape, HitInfoBase hitInfo, BoxDefinitionBase boxDefinitionBase, List <IHurtable> ignoreList = null)
        {
            this.owner          = owner;
            this.directionOwner = directionOwner;
            this.ignoreList     = ignoreList;
            this.hitInfo        = hitInfo;

            BoxDefinition boxDefinition = (BoxDefinition)boxDefinitionBase;

            switch (shape)
            {
            case BoxShapes.Rectangle:
                CreateRectangle(boxDefinition.size);
                break;

            case BoxShapes.Circle:
                CreateCircle(boxDefinition.radius);
                break;

            case BoxShapes.Capsule:
                CreateCapsule(boxDefinition.radius, boxDefinition.height);
                break;
            }
        }
Ejemplo n.º 2
0
 public HurtInfo3D(HitInfoBase hitInfo, Vector3 center, Vector3 forward, Vector3 right)
 {
     this.hitInfo = hitInfo;
     this.center  = center;
     this.forward = forward;
     this.right   = right;
 }
Ejemplo n.º 3
0
 public BoxGroup(BoxGroup other)
 {
     ID = other.ID;
     activeFramesStart = other.activeFramesStart;
     activeFramesEnd   = other.activeFramesEnd;
     hitGroupType      = other.hitGroupType;
     attachToEntity    = other.attachToEntity;
     if (other.hitboxHitInfo.GetType() == typeof(HitInfo))
     {
         hitboxHitInfo = new HitInfo((HitInfo)other.hitboxHitInfo);
     }
     boxes = new List <BoxDefinitionBase>();
 }
Ejemplo n.º 4
0
 public HurtInfo2D(HitInfoBase hitInfo, Vector2 center, int faceDirection)
 {
     this.hitInfo       = hitInfo;
     this.center        = center;
     this.faceDirection = faceDirection;
 }
Ejemplo n.º 5
0
 public HurtInfoBase(HitInfoBase hitInfo)
 {
     this.hitInfo = hitInfo;
 }
 public abstract void Initialize(GameObject owner, Transform directionOwner, int team,
                                 BoxShapes shape, HitInfoBase hitInfo, BoxDefinitionBase boxDefinition, List <IHurtable> ignoreList = null);