This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn has_even(numbers: Vec<i32>) -> bool { | |
for num in numbers { | |
if num % 2 == 0 { | |
return true; | |
} | |
} | |
return false; | |
} | |
fn main() { | |
let vec = vec![1, 9, 2, 5, 4]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func create_collision(): | |
var body = StaticBody.new() | |
var collision = CollisionShape.new() | |
var shape = CylinderShape.new() | |
shape.radius = 100 | |
shape.height = 50 | |
collision.set_shape(shape) | |
body.add_child(collision) | |
self.add_child(body) |
OlderNewer