コード例 #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;
            }
        }
コード例 #2
0
 public HurtInfo3D(HitInfoBase hitInfo, Vector3 center, Vector3 forward, Vector3 right)
 {
     this.hitInfo = hitInfo;
     this.center  = center;
     this.forward = forward;
     this.right   = right;
 }
コード例 #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>();
 }
コード例 #4
0
 public HurtInfo2D(HitInfoBase hitInfo, Vector2 center, int faceDirection)
 {
     this.hitInfo       = hitInfo;
     this.center        = center;
     this.faceDirection = faceDirection;
 }
コード例 #5
0
 public HurtInfoBase(HitInfoBase hitInfo)
 {
     this.hitInfo = hitInfo;
 }
コード例 #6
0
 public abstract void Initialize(GameObject owner, Transform directionOwner, int team,
                                 BoxShapes shape, HitInfoBase hitInfo, BoxDefinitionBase boxDefinition, List <IHurtable> ignoreList = null);