123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- namespace RL
- open Raylib_CsLo
- open Garnet.Composition
- open RL.Action
- open RL.AI
- open RL.Components
- open RL.FieldOfVision
- module EntityFactory =
- let Player(world : Container) =
- (world.Create()
- .With("Player")
- .With(Player())
- .With(BlocksMovement())
- .With({ x = 0; y = 0})
- .With({ spriteID = 64; color = Raylib.WHITE })
- .With(FieldOfVision(8))
- .With(ActionDefs.AwaitAction)
- .With({ap = 100; priority = 99})
- ).Id
- let Orc(world : Container) =
- (world.Create()
- .With("Orc")
- .With(Enemy())
- .With(BlocksMovement())
- .With({ x = 0; y = 0})
- .With({ spriteID = 111; color = Raylib.RED })
- .With(FieldOfVision(5))
- .With(ActionDefs.AwaitAction)
- .With({ap = 100; priority = 0})
- .With(BaseAI())
- ).Id
- let Troll(world : Container) =
- (world.Create()
- .With("Troll")
- .With(Enemy())
- .With(BlocksMovement())
- .With({ x = 0; y = 0})
- .With({ spriteID = 84; color = Raylib.RED })
- .With(FieldOfVision(5))
- .With(ActionDefs.AwaitAction)
- .With({ap = 50; priority = 0})
- .With(BaseAI())
- ).Id
|