VZ/Assets/Scripts/TagLayerManager.cs
Samuel c12f4497fd - Updated Unity Layers
- Refactoring rename Class TagManager to TagLayerManager
- Added Layer Property in class Unit.cs
- Updated method InitializeDefaultTagAndLayer in class ZombieSquad
	and VampireSquad
- Layers now are instancied at run time if the user ommit to specify a layer
  by default the human layer is set to any gameObject that have an Unit.cs script
  attached to it's component. Idem for ZombieSquad and VampireSquad
2015-08-14 12:22:10 -04:00

20 lines
787 B
C#

using System;
using UnityEngine;
using System.Collections;
using System.Linq;
public class TagLayerManager : MonoBehaviour
{
// Use this for initialization
private static readonly string[] availableTags = UnityEditorInternal.InternalEditorUtility.tags;
private static readonly string[] availableLayers = UnityEditorInternal.InternalEditorUtility.layers;
// TODO FIND A WAY TO ADD EXCEPTION ERROR IF THE USER OMMIT TO ADD TAGS!!!
public static string Human = availableTags[7];
public static string VampirePlayer = availableTags[8];
public static string ZombiePlayer = availableTags[9];
// TODO remove hard coding layers
public static int HumanLayerIndex = 8;
public static int VampireLayerIndex = 9;
public static int ZombieLayerIndex = 10;
}