public virtual void SetShipData(IShipModel model) { if (model != null) { _clsIShipModel = model; } }
public virtual void SetShipData(IShipModel model) { if (model == null) { return; } this._clsIShipModel = model; }
public void Construct(IShipModel model, IShipView view, IMovingComponent movingComponent) { _model = model; _view = view; _movingComponent = movingComponent; _movingComponent.onMoving += OnMoving; _movingComponent.onFinishMoving += OnFinishedMoving; }
public virtual void SetShipData(ShipModel_BattleResult model) { _clsIShipModel = model; if (model != null) { _uiShipTex.mainTexture = ShipUtils.LoadBannerTexture(model); _uiShipTex.localSize = ResourceManager.SHIP_TEXTURE_SIZE[(!model.IsDamaged()) ? 1 : 2]; _uiShipTex.shader = ((model.DmgStateEnd != DamageState_Battle.Gekichin && !model.IsEscape()) ? SingletonMonoBehaviour <ResourceManager> .Instance.shader.shaderList[1] : SingletonMonoBehaviour <ResourceManager> .Instance.shader.shaderList[0]); UpdateDamage(model.DmgStateEnd, model.IsEscape()); } }
public virtual void SetShipData(ShipModel_BattleResult model) { this._clsIShipModel = model; if (model == null) { return; } this._uiShipTex.mainTexture = ShipUtils.LoadBannerTexture(model); this._uiShipTex.localSize = ResourceManager.SHIP_TEXTURE_SIZE.get_Item((!model.IsDamaged()) ? 1 : 2); this._uiShipTex.shader = ((model.DmgStateEnd != DamageState_Battle.Gekichin && !model.IsEscape()) ? SingletonMonoBehaviour <ResourceManager> .Instance.shader.shaderList.get_Item(1) : SingletonMonoBehaviour <ResourceManager> .Instance.shader.shaderList.get_Item(0)); this.UpdateDamage(model.DmgStateEnd, model.IsEscape()); }
protected virtual void SetShipTexture(ShipModel_BattleResult model) { this._clsIShipModel = model; if (model == null) { this._uiShipTex.mainTexture = null; this._uiShipTex.get_transform().get_localPosition().Zero(); return; } this._uiShipTex.mainTexture = KCV.Battle.Utils.ShipUtils.LoadTexture(model); this._uiShipTex.MakePixelPerfect(); }
protected virtual void SetShipTexture(ShipModel_BattleResult model) { _clsIShipModel = model; if (model == null) { _uiShipTex.mainTexture = null; _uiShipTex.transform.localPosition.Zero(); } else { _uiShipTex.mainTexture = KCV.Battle.Utils.ShipUtils.LoadTexture(model); _uiShipTex.MakePixelPerfect(); } }
public static Texture2D LoadCardTexture(IShipModel model, bool isDamaged) { return(LoadTexture(model.MstId, (!isDamaged) ? 3 : 4)); }
public static Texture2D LoadBannerTexture(IShipModel model, bool isDamaged) { return(LoadTexture(model.MstId, (!isDamaged) ? 1 : 2)); }
public void LeaveOrbit(IShipModel orbitingShip) { var shipOrbit = gameObject.GetFirstComponentInImmediateChildrenOnly<ShipOrbit>(); D.Assert(shipOrbit != null, "{0}.{1} is not present.".Inject(FullName, typeof(ShipOrbit).Name)); var ship = shipOrbit.gameObject.GetSafeInterfacesInChildren<IShipModel>().Single(s => s == orbitingShip); var parentFleetTransform = ship.UnitCommand.Transform.parent; ship.Transform.parent = parentFleetTransform; }
public void AssumeOrbit(IShipModel ship) { var shipOrbit = gameObject.GetFirstComponentInImmediateChildrenOnly<ShipOrbit>(); if (shipOrbit == null) { UnitFactory.Instance.MakeShipOrbitInstance(gameObject, ship); } else { UnitFactory.Instance.AttachShipToShipOrbit(ship, ref shipOrbit); } }
/// <summary> /// Initializes a new instance of the <see cref="Helm" /> class. /// </summary> /// <param name="ship">The ship.</param> public Helm(IShipModel ship) { _ship = ship; _data = ship.Data; _rigidbody = ship.Transform.rigidbody; _gameTime = GameTime.Instance; _gameSpeedMultiplier = _gameTime.GameSpeed.SpeedMultiplier(); // FIXME where/when to get initial GameSpeed before first GameSpeed change? _gameStatus = GameStatus.Instance; _engineRoom = new EngineRoom(_data, _rigidbody); AssessFrequencyOfCourseProgressChecks(); Subscribe(); }
/// <summary> /// Initializes a new instance of the <see cref="ShipNavigator" /> class. /// </summary> /// <param name="ship">The ship.</param> public ShipNavigator(IShipModel ship) { _ship = ship; _data = ship.Data; _gameTime = GameTime.Instance; _gameSpeedMultiplier = _gameTime.GameSpeed.SpeedMultiplier(); // FIXME where/when to get initial GameSpeed before first GameSpeed change? _gameStatus = GameStatus.Instance; AssessFrequencyOfCourseProgressChecks(); Subscribe(); }
protected virtual void OnDestroy() { this._uiShipTex = null; this._clsIShipModel = null; this.OnUnInit(); }
protected virtual void OnDestroy() { _uiShipTex = null; _clsIShipModel = null; OnUnInit(); }