示例#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);
        }
示例#2
0
        static void Setup()
        {
            QuickPos    = AbilityInterfacer.FindInterfacer("Move");
            QuickTarget = AbilityInterfacer.FindInterfacer("Scan");

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