public override void Initialize() { base.Initialize(); LoadCfgData(CfgID); BrainReg = new Regulator(BrainRegIntervel + UnityEngine.Random.Range(-0.3f, 0.30f)); SensorReg = new Regulator(SensorRegIntervel + UnityEngine.Random.Range(-0.3f, 0.30f)); TargetSysReg = new Regulator(TargetSysRegIntervel + UnityEngine.Random.Range(-0.5f, 0.10f)); Brain = new SoldierThink(this, 1); FSM = new FSMSoldierStateMachine(this); Sensor = new SimSensor <BaseSoldier>(this); Sensor.Range = AlertRadius; Sensor.Initialize(); CombatCom = GetComponent <CombatComponent>(); TargetSys = new TargetSystem(this); TargetSys.OnTargetGet = OnTargetGet; Memory.AddLocation("Work", WorkPlace); }
public override void Initialize() { base.Initialize(); Memory.AddLocation("Work", WorkLocation); Memory.AddLocation("House", HouseLocation); Memory.AddLocation("Food", FoodLocation); Brain = new NormalPeopleThink(this, 1); //transform.position = Memory.GetLocation("House").position; }