internal void Setup(LSAgent agent, int id) { System.Type mainType = this.GetType(); if (mainType.IsSubclassOf(typeof(ActiveAbility))) { while (mainType.BaseType != typeof(ActiveAbility)) { mainType = mainType.BaseType; } Interfacer = AbilityInterfacer.FindInterfacer(mainType); if (Interfacer == null) { throw new System.ArgumentException("The Ability of type " + mainType + " has not been registered in database"); } this.MyAbilityCode = Interfacer.Name; } else { this.MyAbilityCode = mainType.Name; } _agent = agent; ID = id; TemplateSetup(); OnSetup(); this.VariableContainerTicket = LSVariableManager.Register(this); this._variableContainer = LSVariableManager.GetContainer(VariableContainerTicket); }
static void Setup() { QuickPos = AbilityInterfacer.FindInterfacer("Move"); QuickTarget = AbilityInterfacer.FindInterfacer("Scan"); Setted = true; }
public void Setup(LSAgent agent, int id) { Interfacer = AbilityInterfacer.FindInterfacer(this.GetType()); if (Interfacer == null) { throw new System.ArgumentException("This Ability of type " + this.GetType() + " has not been registered in database"); } this.MyAbilityCode = (AbilityCode)Interfacer.MappedCode; _agent = agent; ID = id; TemplateSetup(); OnSetup(); }
public static void Setup() { QuickPos = AbilityInterfacer.FindInterfacer("Move"); QuickTarget = AbilityInterfacer.FindInterfacer("Scan"); }
public static void Setup() { QuickPos = AbilityInterfacer.FindInterfacer(Lockstep.Data.AbilityCode.Move); QuickTarget = AbilityInterfacer.FindInterfacer(Lockstep.Data.AbilityCode.Scan); }