Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CircleCollider2D

Hierarchy

Index

Properties

Readonly TYPE

TYPE: CIRCLE = ECollider2DType.CIRCLE

Protected _body

_body: RigidBody2D | null = null

Protected _density

_density: number = 1

Protected _friction

_friction: number = 0.2

Protected _group

_group: DEFAULT = PhysicsGroup.DEFAULT

Protected _offset

_offset: Vec2 = new Vec2()

Private _radius

_radius: number = 1

Protected _restitution

_restitution: number = 0

Protected _sensor

_sensor: boolean = false

Protected _shape

_shape: IBaseShape | null = null

editing

editing: boolean = false

tag

tag: number = 0

标签。当一个节点上有多个碰撞组件时,在发生碰撞后,可以使用此标签来判断是节点上的哪个碰撞组件被碰撞了。

Accessors

body

density

  • get density(): number
  • set density(v: number): void

friction

  • get friction(): number
  • set friction(v: number): void

group

  • get group(): number
  • set group(v: number): void

impl

  • get impl(): null | IBaseShape

offset

  • get offset(): Vec2
  • set offset(v: Vec2): void

radius

  • get radius(): number
  • set radius(v: number): void

restitution

  • get restitution(): number
  • set restitution(v: number): void

sensor

  • get sensor(): boolean
  • set sensor(v: boolean): void

worldAABB

  • get worldAABB(): Readonly<Rect>

worldPosition

  • get worldPosition(): Readonly<Vec2>

worldRadius

  • get worldRadius(): number

Methods

apply

  • apply(): void

Protected onDestroy

  • onDestroy(): void

Protected onDisable

  • onDisable(): void

Protected onEnable

  • onEnable(): void

Protected onLoad

  • onLoad(): void

Generated using TypeDoc