示例#1
0
        public static void Visualize()
        {
            if (CommandManager.sendType == SendState.None)
            {
                return;
            }
            Interfacing.Visualize();
            if (CurrentBuildTile.IsNotNull())
            {
                if (InputManager.GetInformationDown())
                {
                    if (GUIManager.CanInteract)
                    {
                        GUIManager.InformationDown();
                        CurrentBuildTile = null;
                    }
                }
            }

            BuildManager.Visualize();

            if (IsGathering)
            {
                if (InputManager.GetQuickDown())
                {
                    IsGathering = false;
                    return;
                }

                if (InputManager.GetInformationDown() || CurrentInterfacer.InformationGather == InformationGatherType.None)
                {
                    ProcessInterfacer(CurrentInterfacer);
                }
            }
            else
            {
                if (Selector.MainSelectedAgent != null)
                {
                    if (InputManager.GetQuickDown())
                    {
                        LSAgent target;
                        if (Interfacing.MousedAgent.IsNotNull() &&
                            PlayerManager.GetAllegiance(Interfacing.MousedAgent) == AllegianceType.Enemy &&
                            Selector.MainSelectedAgent.Scanner != null)
                        {
                            ProcessInterfacer((QuickTarget));
                        }
                        else
                        {
                            ProcessInterfacer((QuickPos));
                        }
                    }
                }
            }
        }
示例#2
0
        protected override void OnVisualize()
        {
            SelectionManager.Update();

            if (CommandManager.sendType == SendState.None)
            {
                return;
            }
            RTSInterfacing.Visualize();

            if (IsGathering)
            {
                if (Input.GetMouseButtonDown(1))
                {
                    IsGathering = false;
                    return;
                }

                if (Input.GetMouseButtonDown(0) || CurrentInterfacer.InformationGather == InformationGatherType.None)
                {
                    ProcessInterfacer(CurrentInterfacer);
                }
            }
            else
            {
                if (Selector.MainSelectedAgent != null)
                {
                    if (Input.GetMouseButtonDown(1))
                    {
                        LSAgent target;
                        if (RTSInterfacing.MousedAgent.IsNotNull() &&
                            PlayerManager.GetAllegiance(RTSInterfacing.MousedAgent) == AllegianceType.Enemy &&
                            Selector.MainSelectedAgent.Scanner != null)
                        {
                            ProcessInterfacer((QuickTarget));
                        }
                        else
                        {
                            ProcessInterfacer((QuickPos));
                        }
                    }
                }
            }
        }
 public static AllegianceType GetAllegiance(LSAgent agent)
 {
     return(PlayerManager.GetAllegiance(agent.Controller));
 }