You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
846 B
38 lines
846 B
10 years ago
|
using UnityEngine;
|
||
10 years ago
|
using System.Collections;
|
||
10 years ago
|
using System.Collections.Generic;
|
||
10 years ago
|
|
||
10 years ago
|
namespace Fungus
|
||
10 years ago
|
{
|
||
|
|
||
10 years ago
|
[ExecuteInEditMode]
|
||
10 years ago
|
public class Character : MonoBehaviour
|
||
|
{
|
||
10 years ago
|
public string nameText; // We need a separate name as the object name is used for character variations (e.g. "Smurf Happy", "Smurf Sad")
|
||
|
public Color nameColor = Color.white;
|
||
10 years ago
|
public AudioClip soundEffect;
|
||
10 years ago
|
public Sprite profileSprite;
|
||
10 years ago
|
public List<Sprite> portraits;
|
||
|
public FacingDirection portraitsFace;
|
||
|
public PortraitState state;
|
||
10 years ago
|
|
||
|
[TextArea(5,10)]
|
||
|
public string notes;
|
||
10 years ago
|
|
||
|
static public List<Character> activeCharacters = new List<Character>();
|
||
|
|
||
10 years ago
|
protected virtual void OnEnable()
|
||
10 years ago
|
{
|
||
|
if (!activeCharacters.Contains(this))
|
||
|
{
|
||
|
activeCharacters.Add(this);
|
||
|
}
|
||
|
}
|
||
|
|
||
10 years ago
|
protected virtual void OnDisable()
|
||
10 years ago
|
{
|
||
|
activeCharacters.Remove(this);
|
||
|
}
|
||
10 years ago
|
}
|
||
|
|
||
|
}
|