mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-11 13:51:26 -07:00
33 lines
427 B
Odin
33 lines
427 B
Odin
// Demo 001
|
|
#load "basic.odin"
|
|
#load "game.odin"
|
|
|
|
main :: proc() {
|
|
Vec3 :: type struct { x, y, z: f32 }
|
|
Entity :: type struct {
|
|
using pos: Vec3
|
|
name: string
|
|
}
|
|
|
|
Frog :: type struct {
|
|
using entity: Entity
|
|
jump_height: f32
|
|
}
|
|
|
|
f := Frog{}
|
|
f.name = "ribbit"
|
|
|
|
print_name :: proc(using e: Entity) {
|
|
print_string(name); nl()
|
|
}
|
|
|
|
print_name(f.entity)
|
|
print_name(f)
|
|
|
|
|
|
}
|
|
|
|
|
|
nl :: proc() #inline { print_nl() }
|
|
|