void SetupBuildingIcon(UnitTask Task) { if (Task._targetBuilding == null) { SetIcon(ConvertTaskToOrderType(Task._taskType)); return; } CurrnetType = OrderVisualType.Build; _decal.Mat.SetTexture("_BaseColorMap", TileLibrary.Get().GetBuildingTexture((Tile.TileTypeID)Task._targetBuilding.GetID())); _decal.enabled = (CurrnetType != OrderVisualType.None); }
void SetIcon(OrderVisualType Type) { CurrnetType = Type; _decal.Mat.SetTexture("_BaseColorMap", TileLibrary.Get().GetOrderIcon(CurrnetType)); _decal.enabled = (Type != OrderVisualType.None); }