Skip to content

Commit f88e5f5

Browse files
committed
Expanded the docs a bit
1 parent e04bbc7 commit f88e5f5

File tree

9 files changed

+95
-2
lines changed

9 files changed

+95
-2
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
`Actionable` and `ColorModule` are 2 extremely useful and wide spread types throughout RayWrapper
2+
3+
`Actionable` allows for either a static value OR a function to execute
4+
5+
`ColorModule` is just an extension to `Actionable`
6+
7+
if you just want to set a static, non changing value, thats simple
8+
9+
`Actionable<type> a = new(obj)`
10+
11+
however if you want to add a function, that is also simple but an extra step
12+
13+
```c#
14+
Actionable<type> a = new(() => {
15+
// do stuff
16+
})
17+
```

Examples & Docs/Command System.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
the command system is a very powerful system when the ingame console is enabled (which it is by default)
2+
3+
the command system is also very easy to add to
4+
5+
to add to the command system you need to make a class for the commands
6+
7+
```c#
8+
public class [class name] : ICommandModule
9+
{
10+
// to add a command you need a static method and some attributes
11+
// the method needs to return a string and accept a string[]
12+
[Command("example")] // this attribute sets the command name
13+
[Help("displays message to the help command")] // this is optional
14+
public static string ExampleCommand(string[] args
15+
/*string[] are the arguments passed into the command*/)
16+
{
17+
return "message to the console";
18+
}
19+
}
20+
```
21+
22+
now inorder to register your commands to the ingame console you need to put this in the `Init()` of your `GameLoop`
23+
24+
`CommandRegister.RegisterCommand<[class name]>();`
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
discord integration isn't very difficult to use
2+
3+
first you need to init the discord integration
4+
5+
in the `Init()` of your `GameLoop` do the following:
6+
7+
```C#
8+
GameBox.discordAppId = // this should be the app id used for richpresence
9+
GameBox.Gb.InitDiscord();
10+
```
11+
now you need to set discord integration stuff, there are alot of values you can play with for discord integration
12+
13+
```c#
14+
Func<string> details;
15+
Func<string> state;
16+
Func<string> largeImage;
17+
Func<string> largeText;
18+
Func<string> smallImage;
19+
Func<string> smallText;
20+
```
21+
22+

Examples & Docs/GameObject.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
`GameObject` is the core of all the built in objects and a huge focus and functionality of RayWrapper
2+
3+
`GameObject` has alot of very nice features to it, including direct support to the debug menu, and really good built in tools for movement and such

Examples & Docs/Logger System.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
the logger system is one of the most important systems in RayWrapper
2+
3+
if the game were to crash, the logger will auto save the log in the crash logs folder it auto creates when a crash occurs
4+
5+
there is an ingame console command that will allow the user to print the logger out to a file, it is `printstat`
6+
7+
the logger logs stuff
8+
- from raylib (albeit its a bit odd (numbers are crazy on it))
9+
- from the user (as in from a console command)
10+
- from the console
11+
12+
the logger is a static class, so it is very easy to use
13+
14+
`Logger.Log(logLevel, message);`
15+
16+
loglevel is an enum in the logger class and message is a string
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class Program : GameLoop
2727
```
2828

2929
to save/load items do:
30-
make sure to execute AFTER the save items are registered in the init
30+
make sure to execute AFTER the save items are registered in `Init()`
3131

3232
```c#
3333
// load

Examples & Docs/Scenes.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
RayWrapper has an object called `SceneMod`
2+
3+
normally you would have to make a new `GameObject` for a 'game page', and render it
4+
5+
`GameObject` has a lot of overrides, to compensate for this need I added `SceneMod`
6+
7+
`SceneMod` is a modification of `Scene` so it can be a `GameObject`
8+
9+
`SceneMod` is an abstract class, so you can add it to your 'game pages' and then use `RegisterGameObj` with it
10+
11+
`SceneMod` has its own `RegisterGameObj`, it also has an optional `Update` and `Render` loops you can override if need be
File renamed without changes.

RayWrapper/Vars/Flags.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Collections.Generic;
33
using System.Linq;
44

5-
namespace Incremental_Unlimited_PC.Data.Vars
5+
namespace RayWrapper.Vars
66
{
77
public class Flags<T>
88
{

0 commit comments

Comments
 (0)