| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- //移动方向的枚举
- var moveType = cc.Enum({
- none: 0,
- moveUp: 1,
- moveRight: 2,
- moveDown: 3,
- moveLeft: 4,
- });
- //公路方向的枚举
- var HighwayType = cc.Enum({
- none: 0,//空的,
- moveX: 1,//移动X方向时候的道路
- moveY: 2,//移动Y方向时候的道路
- ZebraCrossingX: 3,//斑马线
- ZebraCrossingY: 4,
- });
- //工人AI类型枚举
- var AI_Worker_Type = cc.Enum({
- Rube: -1,//农夫
- Lumberjack: -1,//伐木工
- Miner: -1,//矿工
- CarryGay: -1,//搬运工
- Nothing: -1,//无状态时候
- });
- //工人当前的状态
- var AI_Animation_Type = cc.Enum({
- None: -1,//没有状态
- Walk: -1,//目前Run
- Idle: -1,//站立
- Hatchet: -1,//砍树
- Pickaxe: -1,//挖矿
- Poke: -1,//摘果实
- CargoCarryBox: -1,//货物运输,有车
- CargoCarryRaw: -1,//载货原料
- });
- //建筑的类型
- var BuildType = cc.Enum({
- //住房
- Housing: -1,
- //农田
- Farmland: -1,
- //采木场
- TimberYard: -1,
- //矿坑
- MiningPit: -1,
- //工厂
- Factory: -1,
- //商店
- Shop: -1,
- //特殊建筑
- Special: -1,
- //神农小镇 种子土地
- HolyFarmland: -1,
- //场景障碍物类型,装扮
- DressUp: -1,
- //神农小镇 养殖场
- HolyAnimal: -1
- });
- /**
- * 神龙小镇的种子类型
- * todo 后续可能根据DragonTownFarmland 需要种子的类型来确定播种
- */
- var SeedType = cc.Enum({
- //Normal -- 默认对应 DragonTownFarmland
- Normal: 0,
- Cabbage: 1,
- Potato: 2,
- Carrot: 3,
- Broccoli: 4,
- Tomato: 5,
- Squash: 6,
- Eggplant: 7,
- Pepper: 8
- });
- var goodsMaterialClass = cc.Class({
- name: "goodsMaterialClass",
- properties: {
- //商品需要的材料
- crops: {
- default: 0,
- type: cc.Integer,
- tooltip: '农作物',
- },
- //商品需要的材料
- wood: {
- default: 0,
- type: cc.Integer,
- tooltip: '木材',
- },
- //商品需要的材料
- mineral: {
- default: 0,
- type: cc.Integer,
- tooltip: '矿石',
- },
- }
- });
- //商品信息
- var goods = cc.Class({
- name: "goodsInfo",
- properties: {
- //是否在销售此商品
- isItSale: {
- default: false,
- tooltip: '是否正在在销售这个商品',
- },
- //商品id
- goodsId: {
- default: 0,
- type: cc.Integer,
- tooltip: '商品id',
- },
- //商品名称
- goodsName: {
- default: '',
- },
- //商品价格
- goodsPrice: {
- default: 0,
- type: cc.Integer,
- tooltip: '商品对应的价格',
- },
- //商品销售效率
- goodsSalesRate: {
- default: 0,
- type: cc.Integer,
- tooltip: '商品销售效率',
- },
- //商品需要的材料
- goodsMaterial: {
- default: null,
- type: goodsMaterialClass,
- tooltip: '商品需要的材料',
- },
- }
- });
- //动物类型
- var AnimalType = cc.Enum({
- None: -1,
- Cow: -1,
- Sheep: -1,
- Pig: -1,
- Chicken: -1,
- Duck: -1,
- Goose: -1,
- Carp: -1,
- GrassCarp: -1,
- Silver: -1,
- SeaFish: -1,
- Shrimp: -1,
- Crab: -1,
- });
- cc.Class({
- extends: cc.Component,
- //Enum
- statics: {
- moveType,
- AI_Worker_Type,
- BuildType,
- goods,
- goodsMaterialClass,
- AI_Animation_Type,
- HighwayType,
- SeedType,
- AnimalType
- },
- });
|