コード例 #1
0
        public override void SetupHUD()
        {
            HudController hud = HudController.Instance;

            if (hud != null)
            {
                hud.CreateHud(this, this.GetWeaponLookAt());

                SetupTargetables();
            }
        }
コード例 #2
0
        public static void SetupTargetables()
        {
            ShipController human = ShipController.GetHuman();
            HudController  hud   = HudController.Instance;

            if ((hud != null) && (human != null))
            {
                for (int i = 0; i < ShipController.Ships.Count; i++)
                {
                    ShipController ship = ShipController.Ships[i];
                    if (FactionController.Instance.IsHostile(human.Faction, ship.Faction))
                    {
                        hud.CreateTargetable(ship);
                    }
                }
            }
        }
コード例 #3
0
 void Awake()
 {
     HudController.Instance = this;
 }