Exemple #1
0
	void Awake () {
		var managers = GameObject.FindWithTag ("Managers");
		timeLine = managers.GetComponent<TimeLine> ();
		slotRecord = managers.GetComponent<SlotRecord> ();
		csqTable = managers.GetComponent<MadnessConsequencesTable> ();
		soundMgr = managers.GetComponent<SoundManager> ();

		if (path == null)
			Debug.LogError (gameObject.name + " doesn't have a path");
		if (itemHolder == null)
			Debug.LogError (gameObject.name + " doesn't have an item holder");
		if (headRenderer == null)
			Debug.LogError (gameObject.name + " doesn't have an head renderer");
		if (materials.Length < 4)
			Debug.LogWarning (gameObject.name + " doesn't have enough materials");
		if (soundsMadnessConsequences.Length < 4)
			Debug.LogWarning (gameObject.name + " doesn't have enough sounds");

		anim = GetComponentInChildren<Animator> ();
		soundSrc = GetComponents<AudioSource> ();

		UpdateOrder ();
		CheckActionValidity ();
	}
Exemple #2
0
 public TableEvent(string action, SlotRecord record)
 {
     Action  = action;
     SRecord = record;
 }