Example #1
0
        protected virtual void ProcessStatus(int index, ref MoveStatus m, ref POIInfo poi, TimeSpan span)
        {
            switch (poi.POIStatus)
            {
            case POIStatusEnum.AtHome:
                if (Helper.RandomFloat(1) < Activity)    //let's shopping
                {
                    navigateToNewPOI(ref m, poi.HomePosition, POIScanRadiusLarge);
                    poi.POIStatus = POIStatusEnum.FromHomeToPOI;
                }
                break;

            case POIStatusEnum.FromHomeToPOI:
            case POIStatusEnum.FromPOIToPOI:
                if (Helper.RandomFloat(1) < Activity)     //continue shopping
                {
                    navigateToNewPOI(ref m, m.CurrentTarget, POIScanRadiusSmall);
                    poi.POIStatus = POIStatusEnum.FromPOIToPOI;
                }
                else
                {
                    navigateToHome(ref m, ref poi);
                    poi.POIStatus = POIStatusEnum.GoHome;
                }
                break;

            case POIStatusEnum.GoHome:
                poi.POIStatus = POIStatusEnum.AtHome;
                break;

            default:
                break;
            }
        }
Example #2
0
 private void navigateToHome(ref MoveStatus m, ref POIInfo poi)
 {
     m.CurrentTarget    = poi.HomePosition;
     m.IsMovingToTarget = MovingStatusEnum.Moving;
 }