Ejemplo n.º 1
0
 public ActionEventArgs(Person doer, Person target, Prop prop, object data = null)
 {
     this.Doer = doer;
     this.Target = target;
     this.Prop = prop;
     this.Data = data;
     this.Stage = ActionStages.Passive;
 }
Ejemplo n.º 2
0
 public Prop CreateProp(string name)
 {
     Prop newProp = new Prop();
     newProp.Template = this.GetPropTemplate(name);
     newProp.Image = newProp.Template.Image;
     newProp.MaxOccupancy = newProp.Template.MaxOccupancy;
     return newProp;
 }
Ejemplo n.º 3
0
 public Uri GetPropImage(Prop prop)
 {
     return new Uri(prop.Template.Source.Directory + @"\Props\Images\" + prop.Image);
 }
Ejemplo n.º 4
0
 protected void PlaceProp(GameEntity target, Prop prop)
 {
     this.Agent.Inventory.Remove(prop);
     target.Inventory.Add(prop);
 }
Ejemplo n.º 5
0
        protected GameAction UseProp(Prop prop)
        {
            GameAction action = null;

            if (prop != null && prop.Template.Actions.Count > 0)
            {
                action = GameAction.Get(MiscUtilities.GetRandomEntry<string>(prop.Template.Actions));

                action.Perform(new ActionEventArgs(this.Agent, null, prop));
            }

            return action;
        }