Created
April 26, 2014 23:36
-
-
Save recursor94/11333946 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LeaveGifts : ChildSituation<GiftGiverSituation> | |
{ //** situation that finds santa object, routes to it and leaves presents. | |
public LeaveGifts(GiftGiverSituation parent) : base(parent) | |
{ | |
} | |
public override void Init(GiftGiverSituation parent) | |
{ | |
this.findGiftGiverObject(); | |
this.Parent.Worker.RouteToObjectRadius(findGiftGiverObject(), 3f); | |
} | |
public GameObject findGiftGiverObject() | |
{ | |
List <GameObject> lotObjects = this.Lot.GetObjects<GameObject>(new Predicate<GameObject>(this.isGiftGiverObject)); | |
return lotObjects[0]; | |
// PlumbBob.SelectedActor.ShowTNSIfSelectable(lotObjects[0] + "" , Sims3.UI.StyledNotification.NotificationStyle.kSimTalking); | |
} | |
private bool isGiftGiverObject(GameObject obj) | |
{ | |
//predicate function to find the object | |
return obj.GetClassName() == "Sims3.Gameplay.Objects.Recursor94.GiftGiverObject"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment