Наследование: CritterChainEventArgs
Пример #1
0
 // 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);
 }
Пример #2
0
        // 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);
        }
Пример #3
0
 // 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;
 }
Пример #4
0
 // 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;
 }