Esempio n. 1
0
 public virtual void TryUse(Vector3 pos)
 {
     if (Reg.IsReady())
     {
         //
     }
 }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
 public override void Process(float dt)
 {
     if (BenefitReg.IsReady())
     {
         PushTax();
     }
 }
Esempio n. 4
0
 public void Attack()
 {
     if (AttackReg.IsReady() &&
         TargetSys.CurTarget != null)
     {
         TargetSys.CurTarget.HPs -= AttackValue;
     }
 }
Esempio n. 5
0
        public void Work()
        {
            if (WorkReg.IsReady())
            {
                Energy -= 5;

                MoneyLeft += 5;
            }
        }
Esempio n. 6
0
        public void GetEnergy()
        {
            if (FoodReg.IsReady())
            {
                Energy += 10;

                MoneyLeft -= 1;
            }
        }
Esempio n. 7
0
        public override void Process(float dt)
        {
            base.Process(dt);

            if (BrainReg.IsReady())
            {
                Brain.Arbitrate();
                Brain.Process();
            }
        }
Esempio n. 8
0
        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();
                    }
                }
            }
        }
Esempio n. 9
0
        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);
        }
Esempio n. 11
0
 public bool IsReady()
 {
     return(UseRate.IsReady());
 }