propObject.ts 458 B

12345678910111213141516171819
  1. import { GAME_OBJECT_TYPE, PROP_TYPE } from "../../utrl/gameEnum";
  2. import GameObject from "../gameObject";
  3. const { ccclass, property } = cc._decorator;
  4. /**道具实体类 */
  5. @ccclass
  6. export default class PropObject extends GameObject {
  7. /**道具类型 */
  8. @property({
  9. type: cc.Enum(PROP_TYPE)
  10. })
  11. prop_type = PROP_TYPE.heal;
  12. /**道具id */
  13. @property
  14. id = 0;
  15. onLoad() {
  16. this.type = GAME_OBJECT_TYPE.prop;
  17. }
  18. }