mirror of
https://github.com/ConjureETS/VZ.git
synced 2026-03-24 02:11:15 +00:00
- 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
20 lines
787 B
C#
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;
|
|
}
|