/// <summary> /// Updates the entity /// </summary> /// <param name="updateClock">Clock causing updates</param> public override void Update( Clock updateClock ) { m_Position.Step( updateClock.CurrentTickTime ); }
private void Update( Clock clock ) { Environment.Environment env = m_Scene.Objects.GetFirstOfType<Environment.Environment>( ); IEnvironmentCollisions collisions = env.PointCollisions; float t = 1.0f / ( float )TinyTime.ToSeconds( clock.LastInterval ); Vector3 move = m_Dir * ( m_Speed * t ); Collision col = collisions.CheckMovement( m_Pos.End, move ); if ( col == null ) { m_Pos.End += move; } else { m_Scene.Renderables.Remove( this ); } m_Pos.Step( clock.CurrentTickTime ); }
/// <summary> /// Calls <see cref="IConnection.ReceiveMessages"/> for each connection /// </summary> private void Update( Clock readClock ) { ReceiveMessages( ); if ( ConnectionsUpdated != null ) { ConnectionsUpdated( ); } }