123456789101112131415161718192021222324252627282930313233343536373839 |
- import { _decorator, Component, Label, Node, RigidBody } from 'cc';
- const { ccclass, property } = _decorator;
- export enum Cube_State {
- live,
- wait,
- dead
- }
- @ccclass('Cube_Infor')
- export class Cube_Infor extends Component {
- @property(Label)
- txt: Label;
- @property(RigidBody)
- rigidbody: RigidBody;
- text: string;
- // lock:boolean = false;
- state: Cube_State = Cube_State.live;
- start() {
- }
- update(deltaTime: number) {
- }
- set Text(value: string) {
- this.txt.string = value;
- }
- get Text() {
- return this.txt.string;
- }
- }
|