Ejemplo n.º 1
0
    public static Material GetMaterialColor(GameElement gameElement, bool isHero = false)
    {
        Material _mat;

        if (!isHero)
        {
            _mat = (Resources.Load(materialDataPath + gameElement.ToString() + "_Creep")) as Material;
        }
        else
        {
            _mat = (Resources.Load(materialDataPath + gameElement.ToString() + "_Hero")) as Material;
        }
        return(_mat);
    }
Ejemplo n.º 2
0
    public static BaseElementObject SpawnUnit(GameElement element, bool isEnemy = false)
    {
        BaseElementObject _unit;

        if (isEnemy)
        {
            _unit = (Resources.Load(unitDataPath + element.ToString() + "_Creep") as GameObject).GetComponent <BaseElementObject>();
        }
        else
        {
            _unit = (Resources.Load(unitDataPath + element.ToString() + "_Hero") as GameObject).GetComponent <BaseElementObject>();
        }
        BaseElementObject unit = GameObject.Instantiate(_unit);

        return(unit);
    }