Add Makefile and format rust core
This commit is contained in:
parent
bd91818682
commit
c74043b4c5
5
Makefile
Normal file
5
Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
rust_build:
|
||||||
|
cd rust && cargo build
|
||||||
|
|
||||||
|
rust_fmt:
|
||||||
|
cd rust && cargo fmt
|
@ -38,7 +38,7 @@ impl ICharacterBody3D for PlayerServerNode {
|
|||||||
self.base_mut().set_velocity(new_velocity);
|
self.base_mut().set_velocity(new_velocity);
|
||||||
}
|
}
|
||||||
self.jumping = false;
|
self.jumping = false;
|
||||||
|
|
||||||
if self.base().is_on_floor() {
|
if self.base().is_on_floor() {
|
||||||
let direction = self.base().get_transform().basis
|
let direction = self.base().get_transform().basis
|
||||||
* Vector3::new(self.input_direction.x, 0.0, self.input_direction.y);
|
* Vector3::new(self.input_direction.x, 0.0, self.input_direction.y);
|
||||||
@ -103,7 +103,11 @@ impl PlayerServerNode {
|
|||||||
Some(map) => map,
|
Some(map) => map,
|
||||||
None => return,
|
None => return,
|
||||||
};
|
};
|
||||||
let args = &[casted_bullet_node.to_variant(), 10.to_variant(), 10.to_variant()];
|
let args = &[
|
||||||
|
casted_bullet_node.to_variant(),
|
||||||
|
10.to_variant(),
|
||||||
|
10.to_variant(),
|
||||||
|
];
|
||||||
map.call("spawn_bullet", args);
|
map.call("spawn_bullet", args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user