Skip to content

Commit

Permalink
Merge branch 'main-star'
Browse files Browse the repository at this point in the history
  • Loading branch information
aratama committed Feb 11, 2025
2 parents 6854071 + 05f760f commit c46833a
Show file tree
Hide file tree
Showing 12 changed files with 162 additions and 360 deletions.
177 changes: 0 additions & 177 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ serde_json = "1.0.138"
strum = "0.26.3"
thiserror = "2.0.11"
uuid = { version = "1.12.1", features = ["js"] }
vleue_navigator = "0.11.1"

[target.'cfg(target_arch = "x86_64")'.dependencies]
bevy_remote_inspector = "0.1.0"
Expand Down
23 changes: 23 additions & 0 deletions assets/registry.spell.ron
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
// 魔法の一覧:

// Rank0
// マジックボルト / 光球 / ランタン / 壺生成
// Rank1
// 悪意の視線 / スライムの塊 / 望遠鏡 / 拡大鏡
// Rank2
// 爆発キノコ / 跳躍 / 水の塊 / 減速 / 並列詠唱 / 敵スライム召喚 / 敵アイボール召喚 / 使い魔召喚 / 蜘蛛の巣
// Rank3
// ニワトリ召喚 / ヘヴィーショット / 三並列詠唱 / 自律型追尾 / 味方スライム召喚 / 精度向上 / 本棚生成 / 火球
// Rank4
// 味方アイボール召喚 / ダッシュ / 衝撃 / 加速 / 岩石落下 / 変化 / 斬撃
// Rank5
// 回復 / 高速詠唱
// Rank6
// 氷結 / 解呪 / 分身
// Rank7
// 光の剣 / 爆弾 / 浮遊
// Rank8
// 巨大スライム召喚
// Rank100
// 無限分身

// https://github.com/ron-rs/ron/blob/master/docs/extensions.md
#![enable(unwrap_newtypes)]
#![enable(implicit_some)]
Expand Down
18 changes: 0 additions & 18 deletions src/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ use serde::Deserialize;
use serde::Serialize;
use std::f32::consts::PI;
use uuid::Uuid;
use vleue_navigator::prelude::PrimitiveObstacle;
use witch::WitchWandSprite;

/// アクターの種類を表します
Expand Down Expand Up @@ -327,8 +326,6 @@ impl Actor {
pub fn get_total_scale_factor(&self) -> f32 {
let mut scale_factor: f32 = -1.0;

// todo

for wand in self.wands.iter() {
for slot in &wand.slots {
scale_factor += match slot {
Expand Down Expand Up @@ -1290,21 +1287,6 @@ pub fn spawn_actor(
},
));

// ナビメッシュの再構築は重いため、本棚のような固定のアクターのみ PrimitiveObstacle を設定します
// アクターが破壊されるとナビメッシュを再計算します
if actor_group == ActorGroup::Entity && props.body_type == BodyType::Fixed {
let scale = 1.0;
builder.insert(match props.collider {
ActorCollider::Ball(radius) => {
(PrimitiveObstacle::Circle(Circle::new(radius * scale)),)
}
ActorCollider::Cuboid(width, height) => (PrimitiveObstacle::Rectangle(Rectangle::new(
width * 2.0 * scale,
height * 2.0 * scale,
)),),
});
}

builder.with_children(|mut parent| {
// 影
if let Some(shadow) = &props.shadow {
Expand Down
5 changes: 0 additions & 5 deletions src/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ use bevy_rapier2d::prelude::*;
use bevy_simple_text_input::TextInputPlugin;
use bevy_simple_websocket::WebSocketPlugin;
use std::num::NonZero;
use vleue_navigator::prelude::NavmeshUpdaterPlugin;
use vleue_navigator::prelude::PrimitiveObstacle;
use vleue_navigator::VleueNavigatorPlugin;

pub fn run_game() {
let mut app = App::new();
Expand Down Expand Up @@ -194,8 +191,6 @@ pub fn run_game() {
.add_systems(Startup, setup_rapier_context)
.add_plugins(Light2dPlugin)
.add_plugins(TextInputPlugin)
.add_plugins(VleueNavigatorPlugin)
.add_plugins(NavmeshUpdaterPlugin::<PrimitiveObstacle>::default())
.add_plugins(EguiPlugin)
//
// 以下はこのゲーム本体で定義されたプラグイン
Expand Down
1 change: 0 additions & 1 deletion src/level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pub mod ceil;
pub mod chunk;
pub mod collision;
pub mod entities;
pub mod navigation;
pub mod spawn;
pub mod tile;
pub mod world;
2 changes: 0 additions & 2 deletions src/level/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ pub struct LevelChunk {
pub entities: Vec<SpawnEvent>,
pub bounds: Bounds,
pub dirty_scriptes: Option<Bounds>,
pub dirty_navmesh: bool,
}

impl LevelChunk {
Expand Down Expand Up @@ -157,7 +156,6 @@ impl LevelChunk {
max_y,
})
},
dirty_navmesh: true,
};
}

Expand Down
Loading

0 comments on commit c46833a

Please sign in to comment.