Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        static void Setup()
        {
            QuickPos    = AbilityInterfacer.FindInterfacer("Move");
            QuickTarget = AbilityInterfacer.FindInterfacer("Scan");

            Setted = true;
        }
Exemplo n.º 3
0
 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();
 }
Exemplo n.º 4
0
 public static void Setup()
 {
     QuickPos    = AbilityInterfacer.FindInterfacer("Move");
     QuickTarget = AbilityInterfacer.FindInterfacer("Scan");
 }
Exemplo n.º 5
0
 public static void Setup()
 {
     QuickPos    = AbilityInterfacer.FindInterfacer(Lockstep.Data.AbilityCode.Move);
     QuickTarget = AbilityInterfacer.FindInterfacer(Lockstep.Data.AbilityCode.Scan);
 }