init() public method

public init ( int effectId, GameObject SpellCaster ) : void
effectId int
SpellCaster GameObject
return void
コード例 #1
0
 /// <summary>
 /// Casts the flameproof. (generic)
 /// </summary>
 /// <param name="caster">Caster.</param>
 /// <param name="ActiveSpellArray">Active spell array.</param>
 /// <param name="EffectID">Effect ID of the spell</param>
 /// <param name="EffectSlot">Effect slot.</param>
 void Cast_Flameproof(GameObject caster, SpellEffect[] ActiveSpellArray, int EffectID, int EffectSlot)
 {
     //Eg resist blows, thick skin etc
             SpellProp_ResistanceAgainstType resist = new SpellProp_ResistanceAgainstType();
             resist.init (EffectID,caster);
             SpellEffectFlameproof sef = (SpellEffectFlameproof)SetSpellEffect (caster,ActiveSpellArray,EffectSlot,EffectID);
             sef.counter=resist.counter;
             sef.Go ();
 }
コード例 #2
0
 /// <summary>
 /// Casts the resistance against type spells (generic)
 /// </summary>
 /// <param name="caster">Caster.</param>
 /// <param name="ActiveSpellArray">Active spell array.</param>
 /// <param name="EffectID">Effect ID of the spell</param>
 /// <param name="EffectSlot">Effect slot.</param>
 public void Cast_ResistanceAgainstType(GameObject caster, SpellEffect[] ActiveSpellArray, int EffectID, int EffectSlot)
 {
     SpellProp_ResistanceAgainstType resistProp = new SpellProp_ResistanceAgainstType();
         resistProp.init (EffectID,caster);
         SpellEffectResistanceAgainstType resistEffect = (SpellEffectResistanceAgainstType)SetSpellEffect(caster,ActiveSpellArray,EffectSlot,EffectID);
         //TODO:What properties to apply
         resistEffect.counter=resistProp.counter;
         resistEffect.Go();
 }