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; } }
public BoxDefinition(BoxDefinition other) { shape = other.shape; offset = other.offset; size = other.size; rotation = other.rotation; radius = other.radius; height = other.height; }