Skip to content

Commit

Permalink
Implement toriel down b
Browse files Browse the repository at this point in the history
  • Loading branch information
rukai committed Dec 7, 2020
1 parent 30f9a0c commit b24e5c8
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 9 deletions.
4 changes: 2 additions & 2 deletions assets_raw/models/Toriel/Toriel.blend
Git LFS file not shown
3 changes: 3 additions & 0 deletions assets_raw/models/TorielOven/TorielOven.blend
Git LFS file not shown
3 changes: 3 additions & 0 deletions assets_raw/models/TorielOven/texture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 21 additions & 5 deletions canon_collision/src/entity/fighters/toriel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,37 @@ impl Toriel {
fn d_special_start(&mut self, context: &mut StepContext, state: &ActionState) -> Option<ActionResult> {
if state.frame == 5 {
let (x, y) = self.player.bps_xy(context, state);
let x = x + self.relative_f(10.0);
let y = y + 10.0;
let x = x + self.relative_f(15.0);
context.new_entities.push(Entity {
ty: EntityType::Item(
Item {
owner_id: None,
body: Body::new(Location::Airbourne { x, y }, true),
body: Body::new(Location::Airbourne { x, y }, !self.player.body.face_right),
}
),
state: ActionState::new(
"PerfectlyGenericObject.cbor".to_string(),
ItemAction::Fall
"TorielOven.cbor".to_string(),
ItemAction::Spawn
),
});
}

if self.player.get_held_item(&context.entities).is_none() {
if state.frame == 50 {
context.new_entities.push(Entity {
ty: EntityType::Item(
Item {
owner_id: Some(self.player.id),
body: Body::new(Location::ItemHeldByPlayer (context.entity_key), true),
}
),
state: ActionState::new(
"PerfectlyGenericObject.cbor".to_string(),
ItemAction::Fall
),
});
}
}
None
}

Expand Down
4 changes: 2 additions & 2 deletions package/Entities/Toriel.cbor
Git LFS file not shown
3 changes: 3 additions & 0 deletions package/Entities/TorielOven.cbor
Git LFS file not shown

0 comments on commit b24e5c8

Please sign in to comment.