chrisgregan
10 years ago
7 changed files with 64 additions and 11 deletions
@ -1,15 +1,32 @@ |
|||||||
using UnityEngine; |
using UnityEngine; |
||||||
using System.Collections; |
using System.Collections; |
||||||
|
using System.Collections.Generic; |
||||||
|
|
||||||
namespace Fungus.Script |
namespace Fungus.Script |
||||||
{ |
{ |
||||||
|
|
||||||
|
[ExecuteInEditMode] |
||||||
public class Character : MonoBehaviour |
public class Character : MonoBehaviour |
||||||
{ |
{ |
||||||
public string characterName; |
public string characterName; |
||||||
public Sprite characterImage; |
public Sprite characterImage; |
||||||
public SayDialog.DialogSide dialogSide; |
public SayDialog.DialogSide dialogSide; |
||||||
public Color characterColor; |
public Color characterColor; |
||||||
|
|
||||||
|
static public List<Character> activeCharacters = new List<Character>(); |
||||||
|
|
||||||
|
void OnEnable() |
||||||
|
{ |
||||||
|
if (!activeCharacters.Contains(this)) |
||||||
|
{ |
||||||
|
activeCharacters.Add(this); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
void OnDisable() |
||||||
|
{ |
||||||
|
activeCharacters.Remove(this); |
||||||
|
} |
||||||
} |
} |
||||||
|
|
||||||
} |
} |
Binary file not shown.
Loading…
Reference in new issue