private void SpaceShip_OnFire(object sender, Assets.Scripts.Entities.SpaceShipEventArgs e) { Vector2 shiftForward = new Vector2(0, 0.02f).DirrectionDependentBehavoir(this.GetComponent <Transform>().eulerAngles.z / Mathf.Rad2Deg); var missle = Instantiate(this.misslePrefab, this.transform.position + new Vector3(shiftForward.x, shiftForward.y, 0), this.transform.rotation); missle.MoveTo(this.transform); }
private void SpaceShip_OnFire(object sender, Assets.Scripts.Entities.SpaceShipEventArgs e) { this.timer.Stop(); this.timer.Start(); this.retarding = true; }
private void SpaceShip_OnStabelize(object sender, Assets.Scripts.Entities.SpaceShipEventArgs e) { this.SpaceShip.FuelConsumption(this.SpaceShip.StabelizeConsumption * Math.Abs(e.StabelizingForce)); }
private void SpaceShip_OnRetard(object sender, Assets.Scripts.Entities.SpaceShipEventArgs e) { this.SpaceShip.FuelConsumption(this.SpaceShip.Consumption); }