public virtual void TryUse(Vector3 pos) { if (Reg.IsReady()) { // } }
public override void Process(float dt) { base.Process(dt); if (BrainReg.IsReady()) { if (UseGoals) { Brain.Arbitrate(); Brain.Process(); } if (UseFSM) { FSM.Process(dt); } } if (SensorReg.IsReady()) { Sensor.Process(dt); } if (TargetSysReg.IsReady()) { TargetSys.Process(dt); } }
public override void Process(float dt) { if (BenefitReg.IsReady()) { PushTax(); } }
public void Attack() { if (AttackReg.IsReady() && TargetSys.CurTarget != null) { TargetSys.CurTarget.HPs -= AttackValue; } }
public void Work() { if (WorkReg.IsReady()) { Energy -= 5; MoneyLeft += 5; } }
public void GetEnergy() { if (FoodReg.IsReady()) { Energy += 10; MoneyLeft -= 1; } }
public override void Process(float dt) { base.Process(dt); if (BrainReg.IsReady()) { Brain.Arbitrate(); Brain.Process(); } }
public override void Process(float dt) { if (IsActive) { base.Process(dt); if (!IsPlayerCtrl) { Brain.Process(); if (BrainReg.IsReady()) { Brain.Arbitrate(); } if (WeaponSelectionReg.IsReady()) { WeaponSys.SelectWeapon(); } } if (SensorReg.IsReady()) { TheSensor.Process(dt); } if (TargetSysReg.IsReady()) { TargetSys.Process(dt); if (!IsPlayerCtrl) { Target = TargetSys.CurTarget; } } if (FoodCostReg.IsReady()) { if (FoodCount > 0) { FoodCount--; } } // temp codes. if (IsPlayerCtrl) { if (Input.GetKeyDown(KeyCode.Space)) { UseWeapon(); } } } }
public override GoalStatus Process() { ActiveIfInactive(); if (Owner.FoodCount <= 0) { Status = GoalStatus.Complete; } else { if (Reg.IsReady()) { Owner.FoodCount--; } } return(Status); }
public override GoalStatus Process() { ActiveIfInactive(); if (Owner.FoodCount == Owner.FoodNeed) { Status = GoalStatus.Complete; } else { if (CollectReg.IsReady()) { // handle collection action. Owner.FoodCount = Owner.FoodCount + 1; int a = 0; } Status = GoalStatus.Active; } return(Status); }
public bool IsReady() { return(UseRate.IsReady()); }