Esempio n. 1
0
 protected override void Awake() {
     base.Awake();
     UnityUtility.ValidateComponentPresence<Rigidbody>(gameObject);
     _shipGraphics = gameObject.GetSafeMonoBehaviour<ShipGraphics>();
     _fleetMgr = gameObject.GetSafeFirstMonoBehaviourInParents<FleetUnitCreator>();
     _fleetCmd = _fleetMgr.gameObject.GetSafeFirstMonoBehaviourInChildren<FleetCommand>();
     _selectionMgr = SelectionManager.Instance;
 }
Esempio n. 2
0
 protected override void Awake() {
     base.Awake();
     Target = _transform;
     _shipCaptain = gameObject.GetSafeMonoBehaviour<ShipCaptain>();
     maxAnimateDistance = Mathf.RoundToInt(GraphicsSettings.Instance.MaxShipAnimateDistanceFactor * _shipCaptain.Size);
     maxShowDistance = Mathf.RoundToInt(GraphicsSettings.Instance.MaxShipShowDistanceFactor * _shipCaptain.Size);
     _fleetMgr = gameObject.GetSafeFirstMonoBehaviourInParents<FleetUnitCreator>();
     InitializeHighlighting();
 }
Esempio n. 3
0
 protected override void Awake() {
     base.Awake();
     _fleetMgr = gameObject.GetSafeMonoBehaviour<FleetUnitCreator>();
     _fleetCmd = gameObject.GetSafeFirstMonoBehaviourInChildren<FleetCommand>();
     _trackingLabelFactory = TrackingWidgetFactory.Instance;
     Target = _fleetCmd.transform;
     InitializeHighlighting();
     maxAnimateDistance = 1; // FIXME maxAnimateDistance not used, this is a dummy value to avoid the warning in AGraphics
 }
Esempio n. 4
0
 protected override void InitializeOnAwake() {
     base.InitializeOnAwake();
     _fleetMgr = _transform.parent.parent.gameObject.GetSafeMonoBehaviour<FleetUnitCreator>();
 }
Esempio n. 5
0
 protected override void Awake() {
     base.Awake();
     _fleetMgr = gameObject.GetSafeFirstMonoBehaviourInParents<FleetUnitCreator>();
     _fleetGraphics = gameObject.GetSafeFirstMonoBehaviourInParents<FleetGraphics>();
 }