Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Oct 14, 2024
1 parent 3ba02c4 commit 128e7ff
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
48 changes: 48 additions & 0 deletions docs/ScriptReference/Interfaces/JCS_Instance.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,51 @@
# JCS_Instance

Singleton instance interface.

This file contain three classes.

### 1) JCS_Instance

See `Example.cs`:

```cs
public class Example : JCS_Instance<Example>
{
private void Awake ()
{
instance = this;
}
}
```

### 2) JCS_InstanceOld

Singleton instance interface to keep the old instance.

See `ExampleOld.cs`:

```cs
public class ExampleOld : JCS_InstanceOld<Example>
{
private void Awake ()
{
CheckInstance(this);
}
}
```

### 3) JCS_InstanceNew

Check singleton for keep the old one.

See `ExampleNew.cs`:

```cs
public class ExampleNew : JCS_InstanceNew<Example>
{
private void Awake ()
{
CheckInstance(this);
}
}
```
4 changes: 2 additions & 2 deletions docs/ScriptReference/Interfaces/JCS_Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ Interface of all setting class.

## Example

ExampleSetting.cs
Example.cs

```cs
public class ExampleSetting : MonoBehaviour
public class Example : JCS_Settings<Example>
{
private void Awake ()
{
Expand Down

0 comments on commit 128e7ff

Please sign in to comment.