0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

BevyEngineのスケジュール種類まとめ(0.14)

Posted at

add_systems(ScheduleLabel, IntoSystemConfigs)

  • ScheduleLabel
    実行するタイミングを指定する
  • IntoSystemConfigs
    指定したタイミングで実行する処理
    とりあえず関数入れればよし

ScheduleLabel種類

参考:https://docs.rs/bevy/latest/bevy/app/struct.Main.html

  • 最初に一度だけ呼ばれる
    1. PreStartup
    2. Startup
    3. PostStartup
  • ゲームループ
    1. First
    2. PreUpdate
    3. Update
    4. PostUpdate
    5. Last
  • 固定フレーム(デフォルトは64Hzでループする)
    1. FixedFirst
    2. FixedPreUpdate
    3. FixedUpdate
    4. FixedPostUpdate
    5. FixedLast

固定フレームの更新頻度を変更する方法

Appにinsert_resource(Time::<Fixed>::from_seconds(0.5))で0.5の箇所を変更すればよい

use bevy::prelude::*;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .insert_resource(Time::<Fixed>::from_seconds(0.5))
        .run();
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?