private void WO_Player_OnDespawn() { _respawn?.Destroy(); _respawn = new AutoRespawn(this, respTime); _manager.SetPosition(this, _player.User.Spawn); _player.Announce(Constants.DeadMsg, 8f); }
private void WO_Pickup_OnSpawn() { if (_resource == null) { return; } _respawn?.Destroy(); _respawn = null; _view = _server.Room.Instantiate(_resource, _data.Position, _data.Rotation); _view.SubscribeToRpc(50, 52, RPC_50_52); _view.GettingPosition += View_GettingPosition; _view.GettingRotation += View_GettingRotation; }
private void WO_MOB_OnSpawn() { if (_resource == null) { return; } _respawn?.Destroy(); _stats.UpdateStats(); _movement.Position = _data.Position; _movement.Rotation = _data.Rotation.ToRadians(); _view = _server.Room.Instantiate(_resource, _data.Position, _data.Rotation); _view.FinishedInstantiation += View_FinishedInstantiation; }