private void OnControllerColliderHit(ControllerColliderHit _hit) { if (_falling && !_landed) { LandEvent?.Invoke(transform.position); _landed = true; } }
private void OnLand(EntityUid uid, ForcefeedOnCollideComponent component, LandEvent args) { if (!component.RemoveOnThrowEnd) { return; } EntityManager.RemoveComponent(uid, component); }
/// <summary> /// Creates a plane that is taken as parameter in landevent /// </summary> /// <returns></returns> public LandEvent Land() { takeoffBtn.IsEnabled = true; changeRouteCmbBox.IsEnabled = false; landBtn.IsEnabled = false; Plane p = new Plane(this.Title, "landed", DateTime.Now.ToString("hh:mm:ss")); LandEvent land = new LandEvent(p); this.Close(); return(land); }
private void DamageOnLand(EntityUid uid, DamageOnLandComponent component, LandEvent args) { var dmg = _damageableSystem.TryChangeDamage(uid, component.Damage, component.IgnoreResistances); if (dmg == null) { return; } _logSystem.Add(LogType.Landed, $"{ToPrettyString(component.Owner):entity} received {dmg.Total:damage} damage from landing"); }
private void HandleLand(EntityUid uid, DrinkComponent component, LandEvent args) { if (component.Pressurized && !component.Opened && _random.Prob(0.25f) && _solutionContainerSystem.TryGetDrainableSolution(uid, out var interactions)) { component.Opened = true; UpdateAppearance(component); var solution = _solutionContainerSystem.Drain(uid, interactions, interactions.DrainAvailable); _spillableSystem.SpillAt(uid, solution, "PuddleSmear"); SoundSystem.Play(Filter.Pvs(uid), component.BurstSound.GetSound(), uid, AudioParams.Default.WithVolume(-4)); } }
private void SpillOnLand(EntityUid uid, SpillableComponent component, LandEvent args) { if (!_solutionContainerSystem.TryGetSolution(uid, component.SolutionName, out var solution)) { return; } if (args.User != null) { _logSystem.Add(LogType.Landed, $"{ToPrettyString(uid):entity} spilled a solution {SolutionContainerSystem.ToPrettyString(solution):solution} on landing"); } var drainedSolution = _solutionContainerSystem.Drain(uid, solution, solution.DrainAvailable); SpillAt(drainedSolution, EntityManager.GetComponent <TransformComponent>(uid).Coordinates, "PuddleSmear"); }
void LandedOnGround(bool land) { LandEvent?.Invoke(land); }
private void OnLand(EntityUid uid, DiceComponent component, LandEvent args) { Roll(uid, component); }
private void HandleEmitSoundOnLand(EntityUid eUI, BaseEmitSoundComponent component, LandEvent arg) { TryEmitSound(component); }
void TriggerGrounded() { airJumpsRemaining = airJumps; //jumpedSteps = 0; LandEvent.Invoke(); }
private void OnCreamPieLand(EntityUid uid, CreamPieComponent component, LandEvent args) { SplatCreamPie(uid, component); }
/// <summary> /// Adds landevent into the list when the button land in FlightWindow is clicked /// </summary> /// <param name="sender"></param> /// <param name="le"></param> public void OnLand(object sender, LandEvent le) { flightDataLst.Items.Add(le); }
private void DamageOnLand(EntityUid uid, DamageOnLandComponent component, LandEvent args) { _damageableSystem.TryChangeDamage(uid, component.Damage, component.IgnoreResistances); }
private void HandleEmitSoundOnLand(EntityUid eUI, BaseEmitSoundComponent component, LandEvent arg) { if (!TryComp <TransformComponent>(eUI, out var xform) || !_mapManager.TryGetGrid(xform.GridUid, out var grid)) { return; } var tile = grid.GetTileRef(xform.Coordinates); if (tile.IsSpace(_tileDefMan)) { return; } TryEmitSound(component); }
private void HandleLand(EntityUid uid, LightBulbComponent bulb, LandEvent args) { PlayBreakSound(uid, bulb); SetState(uid, LightBulbState.Broken, bulb); }
private void HandleLand(EntityUid uid, LightBulbComponent component, LandEvent args) { component.PlayBreakSound(); component.State = LightBulbState.Broken; }
public override Event Action() { Event e = new LandEvent(this.name, this.price, this.owner) as Event; return(e); }