mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-25 15:05:00 -07:00
24 lines
314 B
Odin
24 lines
314 B
Odin
// Demo 001
|
|
#load "basic.odin"
|
|
#load "game.odin"
|
|
|
|
main :: proc() {
|
|
Entity :: type union {
|
|
FROG: struct {
|
|
jump_height: f32
|
|
}
|
|
HELICOPTER: struct {
|
|
weight: f32
|
|
blade_code: int
|
|
}
|
|
}
|
|
|
|
e: Entity
|
|
f: Entity = Entity.FROG{1};
|
|
h: Entity = Entity.HELICOPTER{123, 4};
|
|
|
|
}
|
|
|
|
nl :: proc() { print_nl() }
|
|
|