public GiftGiverSituation(Service service, Lot lot, Sim worker, int cost) : base(service, lot, worker, cost)
 {
     GiftGiverSituation.debugMessage("situation instantiated");
     worker.AssignRole(this);
     this.Worker.Autonomy.Motives.MaxEverything();
     this.Worker.Autonomy.Motives.FreezeDecayEverythingExcept(new CommodityKind[0]);
     this.Worker.Autonomy.AllowedToRunMetaAutonomy = false;
     this.Worker.Autonomy.IncrementAutonomyDisabled();       //what the heck does that do? VOV
     base.SetState(new GiftGiverSituation.RouteToLot(this)); //Should be using inherited walk to lot so that he doesn't driver there instead.
     base.ScheduleSwitchWorkerToServiceOutfit();
 }
Exemplo n.º 2
0
        public void spawnGifts(int numberOfSims)  //maybe in the future make it based on age, tunable variable for whether all age groups are okay or not.
        {
            IGameObject gift;

            float xOffset = 1f;

            for (int n = 0; n < numberOfSims; n++)
            {
                gift = GlobalFunctions.CreateObjectOutOfWorld("giftgiverbox"); //make random later.
                Vector3 objPosition  = base.Target.Position;
                Vector3 giftPosition = new Vector3(objPosition.x + xOffset, objPosition.y, objPosition.z);
                gift.AddToWorld();
                gift.SetPosition(giftPosition);
                GiftGiverSituation.debugMessage("Gift Position" + gift.Position + "santa object position" + this.Target.Position);
                xOffset += 0.7f;
            }
        }