| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- var reGameStates = require('GameStates');
- //人物信息
- var character_Info = cc.Class({
- name: "characterInfo",
- properties: {
- //id
- id: -1,
- //起始位置,代码动态设置
- startTilePos: {
- default: new cc.Vec2(),
- visible: false,
- },
- //是否占用建筑
- isItOccupiedBuilding: {
- default: false,
- visible: false,
- },
- //占用建筑的名称
- //预制件节点的名字
- occupantBuildingName: {
- default: '',
- visible: false,
- },
- //占用建筑的id
- occupantBuildingID: {
- default: -1,
- type: cc.Integer,
- visible: false,
- },
- }
- });
- cc.Class({
- extends: cc.Component,
- properties: {
- //人物信息
- characterInfo: {
- type: character_Info,
- default: null
- },
- //最高体力值
- totalPhysicalStrength: {
- //参数列表
- default: 100, //默认值
- type: cc.Integer, //限制属性类型,例如cc.Node或cc.Integer以及Texture.WrapMode(文字型枚举类型?)
- visible: false, //属性框显隐
- // displayName: '体力值', //显示名字
- tooltip: '最高体力值', // 名字注释
- // range : [min,max,step] , //范围
- // slide : boolean , // 滑动条
- },
- //体力值
- physicalStrength: {
- //参数列表
- default: 100, //默认值
- type: cc.Integer, //限制属性类型,例如cc.Node或cc.Integer以及Texture.WrapMode(文字型枚举类型?)
- visible: true, //属性框显隐
- // displayName: '体力值', //显示名字
- tooltip: '体力值:决定在房子里休息多久,干活时间', // 名字注释
- // range : [min,max,step] , //范围
- // slide : boolean , // 滑动条
- },
- //忠诚度
- loyalty: {
- default: 100,
- type: cc.Integer,
- visible: true,
- // displayName: '忠诚度',
- tooltip: '忠诚度:如果工资不符合就会一直掉,低于50就会跑走',
- },
- //劳动力
- labour: {
- default: 5,
- type: cc.Integer,
- visible: true,
- tooltip: '劳动力:劳动力越高干活速度越快',
- },
- //人物速度
- characterSpeed: {
- default: 100,
- type: cc.Integer,
- visible: true,
- // displayName: '速度',
- tooltip: '速度:干活的速度,移动速度',
- },
- //身上是否有物品
- //可以是商品或者原材料
- isThereAItem: {
- default: false,
- visible: false,
- },
- transItems: {
- default: 0,
- type: cc.Integer,
- visible: true,
- // displayName: '搬运的货物',
- tooltip: '搬运货物的数量:当前身上的货物',
- },
- //是否有住房
- isThereAHouse: {
- default: false,
- visible: false,
- },
- //自己占用的房屋
- MyHouse: {
- default: null,
- visible: false,
- },
- // //人物建筑目标信息
- // targetBuildInfo: {
- // default: null,
- // visible: false,
- // },
- // //人物建筑目标节点
- // targetBuildInfoNode: {
- // default: null,
- // type: cc.Node,
- // visible: false,
- // },
- //建筑目标的buildingsInfo脚本
- targetBuildingsInfo: {
- default: null,
- type: cc.Node,
- visible: false,
- },
- //正在休息
- isResting: {
- default: false,
- visible: false,
- },
- //正在行走
- isWalking: {
- default: false,
- visible: false,
- },
- //正在工作
- isWorking: {
- default: false,
- visible: false,
- },
- //正在运输
- isTransport: {
- default: false,
- visible: false,
- },
- //是否寻找到工作
- isFindingAJob: {
- default: false,
- visible: false,
- },
- //是否可以解雇:默认可以解雇,只有找到工作才不解雇
- //空闲,返回家里,回家途中都可以解雇
- isCanDismissed: {
- default: true,
- visible: false,
- },
- },
- });
|