/** * @Author: Gongxh * @Date: 2024-12-21 * @Description: εŽŸεž‹ */ import { Rect } from "cc"; import { Shape } from "./Shape"; export class Circle extends Shape { public radius: number; // εŠεΎ„ constructor(radius: number, tag: number = -1) { super(tag); this.radius = radius; this.boundingBox.x = -this.radius; this.boundingBox.y = -this.radius; this.boundingBox.width = this.radius * 2; this.boundingBox.height = this.radius * 2; } public getBoundingBox(): Rect { return this.boundingBox; } }