public static void Setup()
 {
     AbilityInterfacer[] interfacers = LSDatabaseManager.CurrentDatabase.AbilityData;
     for (int i = 0; i < interfacers.Length; i++)
     {
         AbilityInterfacer interfacer = interfacers[i];
         CodeInterfacerMap.Add(interfacer.Name, interfacer);
         TypeInterfacerMap.Add(interfacer.Script.Type, interfacer);
     }
 }
Esempio n. 2
0
        public static void Setup()
        {
            AbilityInterfacer[] interfacers = (LSDatabaseManager.CurrentDatabase as DefaultLSDatabase).AbilityData;
            for (int i = 0; i < interfacers.Length; i++)
            {
                AbilityInterfacer interfacer = interfacers[i];
                if (interfacer.Script.Type == null)
                {
                    Debug.Log(interfacer.Name);

                    //exception or ignore?
                    continue;
                }
                CodeInterfacerMap.Add(interfacer.Name, interfacer);
                TypeInterfacerMap.Add(interfacer.Script.Type, interfacer);
            }
        }
 public static void Setup()
 {
     QuickPos = AbilityInterfacer.FindInterfacer(Lockstep.Data.AbilityCode.Move);
     QuickTarget = AbilityInterfacer.FindInterfacer(Lockstep.Data.AbilityCode.Scan);
 }
 private static void ProcessInterfacer(AbilityInterfacer facer)
 {
     switch (facer.InformationGather)
     {
         case InformationGatherType.Position:
             curCom = new Command(facer.ListenInput);
             curCom.Position = Interfacing.GetWorldPosD(Input.mousePosition);
             break;
         case InformationGatherType.Target:
             curCom = new Command(facer.ListenInput);
             if (Interfacing.MousedAgent .IsNotNull())
             {
                 curCom.Target = Interfacing.MousedAgent.LocalID;
             }
             break;
         case InformationGatherType.PositionOrTarget:
             curCom = new Command(facer.ListenInput);
             if (Interfacing.MousedAgent .IsNotNull())
             {
                 curCom.Target = Interfacing.MousedAgent.GlobalID;
             } else
             {
                 curCom.Position = Interfacing.GetWorldPosD(Input.mousePosition);
             }
             break;
         case InformationGatherType.None:
             curCom = new Command(facer.ListenInput);
             break;
     }
     if (facer.MarkType != MarkerType.None)
     {
         Interfacing.ActivateMarkerOnMouse(facer.MarkType);
     }
     Send(curCom);
 }
 public static void Setup()
 {
     QuickPos = AbilityInterfacer.FindInterfacer ("Move");
     QuickTarget = AbilityInterfacer.FindInterfacer("Scan");
 }
 public void ResetTile()
 {
     if (this == null) return;
     gameObject.SetActiveIfNot (false);
     _interfacer = null;
 }