// called by engine bool RaiseUseSkill(int skill, Critter on_cr, Item on_item, IntPtr on_scenery) { if (UseSkill != null) { var e = new CritterUseSkillEventArgs(this, skill, on_cr, on_item, Scenery.FromNative(on_scenery)); UseSkill(this, e); return(e.Prevent); } return(false); }
// called by engine internal bool RaiseUse(Critter cr, Critter on_critter, Item on_item, IntPtr on_scenery) { if (use != null) { var e = new ItemUseEventArgs(this, cr, on_critter, on_item, Scenery.FromNative(on_scenery)); use(this, e); return(e.Prevent); } return(false); }
// called by engine bool RaiseUseItem(Item item, Critter on_cr, Item on_item, IntPtr on_scenery) { if (UseItem != null) { var e = new CritterUseItemEventArgs(this, item, on_cr, on_item, Scenery.FromNative(on_scenery)); UseItem(this, e); return(e.Prevent); } return(false); }
// called by engine static bool RaiseCritterUseSkill(Critter cr, int skill, Critter target_cr, Item target_item, Scenery target_scen) { CritterUseSkillEventArgs e = null; if (CritterUseSkill != null) { e = new CritterUseSkillEventArgs(cr, skill, target_cr, target_item, target_scen); CritterUseSkill(null, e); } return(e != null ? e.Prevent : false); }
// called by engine static bool RaiseCritterUseItem(Critter cr, Item item, Critter target_cr, Item target_item, Scenery target_scen, uint param) { GlobalCritterUseItemEventArgs e = null; if (CritterUseItem != null) { e = new GlobalCritterUseItemEventArgs(cr, item, target_cr, target_item, target_scen, param); CritterUseItem(null, e); } return(e != null ? e.Prevent : false); }
public CritterSmthUseItemEventArgs(Critter cr, Critter from_cr, Item item, Critter on_cr, Item on_item, Scenery on_scenery) : base(cr, item, on_cr, on_item, on_scenery) { this.From = from_cr; }
public ItemUseEventArgs(Item item, Critter cr, Critter on_critter, Item on_item, Scenery on_scenery) : base(item) { this.Cr = cr; this.OnCritter = on_critter; this.OnItem = on_item; this.OnScenery = on_scenery; }
// called by engine void RaiseSmthUseSkill(Critter from_cr, int skill, Critter on_cr, Item on_item, IntPtr on_scenery) { if (SmthUseSkill != null) { SmthUseSkill(this, new CritterSmthUseSkillEventArgs(this, from_cr, skill, on_cr, on_item, Scenery.FromNative(on_scenery))); } }
// called by engine static bool RaiseCritterUseSkill(Critter cr, int skill, Critter target_cr, Item target_item, Scenery target_scen) { CritterUseSkillEventArgs e = null; if (CritterUseSkill != null) { e = new CritterUseSkillEventArgs(cr, skill, target_cr, target_item, target_scen); CritterUseSkill(null, e); } return e != null ? e.Prevent : false; }
public GlobalCritterUseItemEventArgs(Critter cr, Item item, Critter on_cr, Item on_item, Scenery on_scen, uint param) : base(cr, item, on_cr, on_item, on_scen) { this.Param = param; }
public CritterUseSkillEventArgs(Critter cr, int skill, Critter on_cr, Item on_item, Scenery on_scenery) : base(cr) { this.Skill = skill; this.OnCr = on_cr; this.OnItem = on_item; this.OnScenery = on_scenery; }
public CritterSmthUseSkillEventArgs(Critter cr, Critter from_cr, int skill, Critter on_cr, Item on_item, Scenery on_scenery) : base(cr, skill, on_cr, on_item, on_scenery) { this.From = from_cr; }
public CritterUseItemEventArgs(Critter cr, Item item, Critter on_cr, Item on_item, Scenery on_scenery) : base(cr) { this.Item = item; this.OnCr = on_cr; this.OnItem = on_item; this.OnScenery = on_scenery; }
public virtual bool EventUse(Critter cr, Critter on_critter, Item on_item, Scenery on_scenery) { return(Item_EventUse(thisptr, cr.ThisPtr, (IntPtr)on_critter, (IntPtr)on_item, (IntPtr)on_scenery)); }
public virtual void EventSmthUseItem(Critter from_cr, Item item, Critter on_critter, Item on_item, Scenery on_scenery) { Crit_EventSmthUseItem(thisptr, from_cr.ThisPtr, item.ThisPtr, on_critter != null ? on_critter.ThisPtr : IntPtr.Zero, on_item != null ? on_item.ThisPtr : IntPtr.Zero, on_scenery != null ? on_scenery.ThisPtr : IntPtr.Zero); }
// called by engine static bool RaiseCritterUseItem(Critter cr, Item item, Critter target_cr, Item target_item, Scenery target_scen, uint param) { GlobalCritterUseItemEventArgs e = null; if (CritterUseItem != null) { e = new GlobalCritterUseItemEventArgs(cr, item, target_cr, target_item, target_scen, param); CritterUseItem(null, e); } return e != null ? e.Prevent : false; }
public virtual bool EventUseItem(Item item, Critter on_critter, Item on_item, Scenery on_scenery) { return Crit_EventUseItem(thisptr, item.ThisPtr, on_critter != null ? on_critter.ThisPtr : IntPtr.Zero, on_item != null ? on_item.ThisPtr : IntPtr.Zero, on_scenery != null ? on_scenery.ThisPtr : IntPtr.Zero); }
public virtual bool EventUseSkill(int skill, Critter on_critter, Item on_item, Scenery on_scenery) { return Crit_EventUseSkill(thisptr, skill, on_critter != null ? on_critter.ThisPtr : IntPtr.Zero, on_item != null ? on_item.ThisPtr : IntPtr.Zero, on_scenery != null ? on_scenery.ThisPtr : IntPtr.Zero); }
public virtual bool EventUse(Critter cr, Critter on_critter, Item on_item, Scenery on_scenery) { return Item_EventUse(thisptr, cr.ThisPtr, (IntPtr)on_critter, (IntPtr)on_item, (IntPtr)on_scenery); }
// called by engine void RaiseSmthUseItem(Critter from_cr, Item item, Critter on_cr, Item on_item, IntPtr on_scenery) { if (SmthUseItem != null) { SmthUseItem(this, new CritterSmthUseItemEventArgs(this, from_cr, item, on_cr, on_item, Scenery.FromNative(on_scenery))); } }