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; }
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(); }
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 }
protected override void InitializeOnAwake() { base.InitializeOnAwake(); _fleetMgr = _transform.parent.parent.gameObject.GetSafeMonoBehaviour<FleetUnitCreator>(); }
protected override void Awake() { base.Awake(); _fleetMgr = gameObject.GetSafeFirstMonoBehaviourInParents<FleetUnitCreator>(); _fleetGraphics = gameObject.GetSafeFirstMonoBehaviourInParents<FleetGraphics>(); }