CubeConfig.ts 956 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import { _decorator, Color, Component, Node } from 'cc';
  2. const { ccclass, property } = _decorator;
  3. @ccclass('CubeConfig')
  4. export class CubeConfig {
  5. }
  6. export const IdToName: { [key: number]: string } = {
  7. 0:'redCube',
  8. 1:'blueCube',
  9. 2:'greenCube',
  10. 3:'yellowCube',
  11. 4:'greyCube'
  12. };
  13. export const config={
  14. redCube:{
  15. id:0,
  16. //:new Color(255, 105, 180),
  17. effectName:'red'
  18. } as cube,
  19. blueCube:{
  20. id:1,
  21. //color:new Color(102, 153, 204),
  22. effectName:'blue'
  23. } as cube,
  24. greenCube:{
  25. id:2,
  26. //color:new Color(144, 238, 144),
  27. effectName:'green'
  28. } as cube,
  29. yellowCube:{
  30. id:3,
  31. //color:new Color(255, 255, 64),
  32. effectName:'yellow'
  33. } as cube,
  34. greyCube:{
  35. id:4,
  36. //color:new Color(255, 255, 64),
  37. effectName:'grey'
  38. } as cube
  39. }
  40. type cube={
  41. id:number,
  42. color:Color,
  43. effectName:string
  44. }