Exemple #1
0
 public spellRow(Nr3 nr, RoleClass roleClass, KeyRep keyRep, Action <Vector3, GameObject> spell, float castTime, float cooldown)
 {
     this.nr        = nr;
     this.roleClass = roleClass;
     this.keyRep    = keyRep;
     this.spell     = spell;
     this.castTime  = castTime;
     this.cooldown  = cooldown;
 }
Exemple #2
0
    public static Action <Vector3, GameObject> index(Nr3 nr, RoleClass roleclass, KeyRep keyrep)
    {
        IQueryable <Action <Vector3, GameObject> > quary = from spellRow row
                                                           in FullSpellBook
                                                           where row.roleClass == roleclass &&
                                                           row.nr == nr &&
                                                           row.keyRep == keyrep
                                                           select row.spell;

        return(quary.First()); // get first spell in resulting table or crash if none exist.
    }