| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- import { _decorator, Color, Component, Node } from 'cc';
- const { ccclass, property } = _decorator;
- @ccclass('CubeConfig')
- export class CubeConfig {
-
- }
- export const IdToName: { [key: number]: string } = {
- 0:'redCube',
- 1:'blueCube',
- 2:'greenCube',
- 3:'yellowCube',
- };
- export const config={
- redCube:{
- id:0,
- color:Color.RED
- } as cube,
- blueCube:{
- id:1,
- color:Color.BLUE
- } as cube,
- greenCube:{
- id:2,
- color:Color.GREEN
- } as cube,
- yellowCube:{
- id:3,
- color:Color.YELLOW
- } as cube,
- }
- type cube={
- id:number,
- color:Color
- }
|