Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev
commit
ee096187ad
Binary file not shown.
Before Width: | Height: | Size: 4.0 MiB After Width: | Height: | Size: 247 KiB |
|
@ -6,7 +6,7 @@ TextureImporter:
|
||||||
serializedVersion: 9
|
serializedVersion: 9
|
||||||
mipmaps:
|
mipmaps:
|
||||||
mipMapMode: 0
|
mipMapMode: 0
|
||||||
enableMipMap: 1
|
enableMipMap: 0
|
||||||
sRGBTexture: 1
|
sRGBTexture: 1
|
||||||
linearTexture: 0
|
linearTexture: 0
|
||||||
fadeOut: 0
|
fadeOut: 0
|
||||||
|
@ -31,7 +31,7 @@ TextureImporter:
|
||||||
maxTextureSize: 2048
|
maxTextureSize: 2048
|
||||||
textureSettings:
|
textureSettings:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
filterMode: -1
|
filterMode: 2
|
||||||
aniso: -1
|
aniso: -1
|
||||||
mipBias: -100
|
mipBias: -100
|
||||||
wrapU: 1
|
wrapU: 1
|
||||||
|
@ -49,7 +49,7 @@ TextureImporter:
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
alphaUsage: 1
|
alphaUsage: 1
|
||||||
alphaIsTransparency: 0
|
alphaIsTransparency: 1
|
||||||
spriteTessellationDetail: -1
|
spriteTessellationDetail: -1
|
||||||
textureType: 0
|
textureType: 0
|
||||||
textureShape: 1
|
textureShape: 1
|
||||||
|
@ -80,9 +80,51 @@ TextureImporter:
|
||||||
allowsAlphaSplitting: 0
|
allowsAlphaSplitting: 0
|
||||||
overridden: 0
|
overridden: 0
|
||||||
androidETC2FallbackOverride: 0
|
androidETC2FallbackOverride: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
buildTarget: Android
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: 65
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 1
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
buildTarget: iPhone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: 55
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 1
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
spriteSheet:
|
spriteSheet:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
sprites: []
|
sprites:
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: 0714
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 2048
|
||||||
|
height: 1189
|
||||||
|
alignment: 0
|
||||||
|
pivot: {x: 0, y: 0}
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
tessellationDetail: -1
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
outline: []
|
outline: []
|
||||||
physicsShape: []
|
physicsShape: []
|
||||||
bones: []
|
bones: []
|
||||||
|
|
|
@ -464,7 +464,7 @@ function this.GetFriendHelpHeros(trailType,func)
|
||||||
tempdata.player = v
|
tempdata.player = v
|
||||||
tempdata.hero = this.UpdateHeroDatas(v.hero,v)
|
tempdata.hero = this.UpdateHeroDatas(v.hero,v)
|
||||||
table.insert(this.friendHelpHeros[v.trailType],tempdata)
|
table.insert(this.friendHelpHeros[v.trailType],tempdata)
|
||||||
local power = HeroPowerManager.GetHeroPower(tempdata.hero)
|
local power = HeroPowerManager.GetHeroPower(tempdata.hero.dynamicId)
|
||||||
-- local allAddProVal = HeroManager.CalculateHeroAllProValList(1, tempdata.hero, false)
|
-- local allAddProVal = HeroManager.CalculateHeroAllProValList(1, tempdata.hero, false)
|
||||||
tempdata.hero.warPower = power--allAddProVal[HeroProType.WarPower]
|
tempdata.hero.warPower = power--allAddProVal[HeroProType.WarPower]
|
||||||
end
|
end
|
||||||
|
@ -508,7 +508,8 @@ function this.SetFriendHelpHero(helpFightList,trailType)
|
||||||
this.friendHelpHero[v.trailType].player = v
|
this.friendHelpHero[v.trailType].player = v
|
||||||
this.friendHelpHero[v.trailType].hero = this.UpdateHeroDatas(v.hero,v)
|
this.friendHelpHero[v.trailType].hero = this.UpdateHeroDatas(v.hero,v)
|
||||||
-- local allAddProVal = HeroManager.CalculateHeroAllProValList(1, this.friendHelpHero[v.trailType].hero, false)
|
-- local allAddProVal = HeroManager.CalculateHeroAllProValList(1, this.friendHelpHero[v.trailType].hero, false)
|
||||||
local power = HeroPowerManager.GetHeroPower(v.hero.dynamicId)
|
|
||||||
|
local power = HeroPowerManager.GetHeroPower(v.hero.id)
|
||||||
this.friendHelpHero[v.trailType].hero.warPower = power -- allAddProVal[HeroProType.WarPower]
|
this.friendHelpHero[v.trailType].hero.warPower = power -- allAddProVal[HeroProType.WarPower]
|
||||||
end
|
end
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Formation.OnFormationChange1)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Formation.OnFormationChange1)
|
||||||
|
@ -557,7 +558,7 @@ function this.SetFriendHelpHero(helpFightList,trailType)
|
||||||
this.friendHelpHero[trailType].player = helpFightList
|
this.friendHelpHero[trailType].player = helpFightList
|
||||||
this.friendHelpHero[trailType].hero = this.UpdateHeroDatas(helpFightList.hero,helpFightList)
|
this.friendHelpHero[trailType].hero = this.UpdateHeroDatas(helpFightList.hero,helpFightList)
|
||||||
-- local allAddProVal = HeroManager.CalculateHeroAllProValList(1, this.friendHelpHero[trailType].hero, false)
|
-- local allAddProVal = HeroManager.CalculateHeroAllProValList(1, this.friendHelpHero[trailType].hero, false)
|
||||||
local power = HeroPowerManager.GetHeroPower(helpFightList.hero.dynamicId)
|
local power = HeroPowerManager.GetHeroPower(helpFightList.hero.id)
|
||||||
this.friendHelpHero[trailType].hero.warPower = power -- allAddProVal[HeroProType.WarPower]
|
this.friendHelpHero[trailType].hero.warPower = power -- allAddProVal[HeroProType.WarPower]
|
||||||
else
|
else
|
||||||
this.friendHelpHero[trailType] = nil
|
this.friendHelpHero[trailType] = nil
|
||||||
|
|
|
@ -490,6 +490,9 @@ end
|
||||||
function this.HeroCalculateFourQuaWarForce(_professionId)
|
function this.HeroCalculateFourQuaWarForce(_professionId)
|
||||||
local addAllProVal={}
|
local addAllProVal={}
|
||||||
local professionInfo=this.FourQuadrantData[_professionId]
|
local professionInfo=this.FourQuadrantData[_professionId]
|
||||||
|
if not professionInfo then
|
||||||
|
return addAllProVal
|
||||||
|
end
|
||||||
if professionInfo.propertyList then
|
if professionInfo.propertyList then
|
||||||
---计算强化属性
|
---计算强化属性
|
||||||
for i = 1, #professionInfo.propertyList do
|
for i = 1, #professionInfo.propertyList do
|
||||||
|
|
|
@ -343,6 +343,251 @@ namespace LJ_OptTools
|
||||||
GameEditor.CustomImportSettings.enabled = false;
|
GameEditor.CustomImportSettings.enabled = false;
|
||||||
EditorUtility.ClearProgressBar();
|
EditorUtility.ClearProgressBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 图片压缩
|
||||||
|
[MenuItem("Assets/图片压缩/UITextue")]
|
||||||
|
public static void UITexture()
|
||||||
|
{
|
||||||
|
DoCompress(0);
|
||||||
|
}
|
||||||
|
[MenuItem("Assets/图片压缩/BGSingle")]
|
||||||
|
public static void BGSingle()
|
||||||
|
{
|
||||||
|
DoCompress(1);
|
||||||
|
}
|
||||||
|
[MenuItem("Assets/图片压缩/BGMultiple")]
|
||||||
|
public static void BGMultiple()
|
||||||
|
{
|
||||||
|
DoCompress(2);
|
||||||
|
}
|
||||||
|
[MenuItem("Assets/图片压缩/SpineTexture")]
|
||||||
|
public static void SpineTexture()
|
||||||
|
{
|
||||||
|
DoCompress(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void DoCompress(int cType)
|
||||||
|
{
|
||||||
|
var guids = Selection.assetGUIDs;
|
||||||
|
var filePaths = new List<string>();
|
||||||
|
foreach (var id in guids)
|
||||||
|
{
|
||||||
|
var path = AssetDatabase.GUIDToAssetPath(id);
|
||||||
|
if (File.Exists(path))
|
||||||
|
{
|
||||||
|
if (!filePaths.Contains(path))
|
||||||
|
filePaths.Add(path);
|
||||||
|
}
|
||||||
|
else if (Directory.Exists(path))
|
||||||
|
{
|
||||||
|
var subFileGuids = AssetDatabase.FindAssets("t:Texture", new string[] { path });
|
||||||
|
if (subFileGuids != null && subFileGuids.Length > 0)
|
||||||
|
{
|
||||||
|
foreach (var subId in subFileGuids)
|
||||||
|
{
|
||||||
|
var subPath = AssetDatabase.GUIDToAssetPath(subId);
|
||||||
|
if (!filePaths.Contains(subPath))
|
||||||
|
filePaths.Add(subPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (filePaths.Count < 1) return;
|
||||||
|
for (int i = 0; i < filePaths.Count; i++)
|
||||||
|
{
|
||||||
|
string path = filePaths[i];
|
||||||
|
EditorUtility.DisplayProgressBar(string.Format("Opt UI Texture({0}/{1})", i, filePaths.Count), path, i * 1f / filePaths.Count);
|
||||||
|
TextureImporter ti = (TextureImporter)TextureImporter.GetAtPath(path);
|
||||||
|
switch (cType)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
SetUITexture(ti);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
SetBGSingle(ti);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
SetBGMultiple(ti);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
SetSpineTexture(ti);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
AssetDatabase.ImportAsset(path);
|
||||||
|
}
|
||||||
|
EditorUtility.ClearProgressBar();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设置UI图片自动图集名称,与图片格式
|
||||||
|
/// </summary>
|
||||||
|
///
|
||||||
|
public static string GetAtlasName(string assetPath)
|
||||||
|
{
|
||||||
|
int index = assetPath.IndexOf("/Atlas/");
|
||||||
|
string atlasName = assetPath.Substring(index + 7);
|
||||||
|
index = atlasName.IndexOf("/");
|
||||||
|
if (index != -1)
|
||||||
|
{
|
||||||
|
atlasName = atlasName.Substring(0, index);
|
||||||
|
}
|
||||||
|
return atlasName;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void SetUITexture(TextureImporter importer)
|
||||||
|
{
|
||||||
|
importer.spritePackingTag = GetAtlasName(importer.assetPath);
|
||||||
|
|
||||||
|
TextureImporterSettings importerSettings = new TextureImporterSettings();
|
||||||
|
importer.ReadTextureSettings(importerSettings);
|
||||||
|
importerSettings.npotScale = TextureImporterNPOTScale.None;
|
||||||
|
importerSettings.spriteMode = 1;//Single
|
||||||
|
importerSettings.spritePixelsPerUnit = GameLogic.AppConst.PIXELTOWORLD;
|
||||||
|
importerSettings.mipmapEnabled = false;
|
||||||
|
importerSettings.wrapMode = TextureWrapMode.Clamp;
|
||||||
|
importerSettings.filterMode = FilterMode.Trilinear;
|
||||||
|
importerSettings.alphaIsTransparency = true;
|
||||||
|
importer.SetTextureSettings(importerSettings);
|
||||||
|
|
||||||
|
//Android
|
||||||
|
TextureImporterPlatformSettings s_Android = new TextureImporterPlatformSettings();
|
||||||
|
s_Android.name = "Android";
|
||||||
|
s_Android.maxTextureSize = 2048;
|
||||||
|
s_Android.format = TextureImporterFormat.ETC2_RGBA8Crunched;
|
||||||
|
s_Android.compressionQuality = 50;
|
||||||
|
s_Android.allowsAlphaSplitting = false;
|
||||||
|
s_Android.overridden = true;
|
||||||
|
importer.SetPlatformTextureSettings(s_Android);
|
||||||
|
|
||||||
|
//IOS
|
||||||
|
TextureImporterPlatformSettings s_IOS = new TextureImporterPlatformSettings();
|
||||||
|
s_IOS.name = "iPhone";
|
||||||
|
s_IOS.maxTextureSize = 2048;
|
||||||
|
s_IOS.format = TextureImporterFormat.PVRTC_RGBA4;
|
||||||
|
s_IOS.compressionQuality = 50;
|
||||||
|
s_IOS.allowsAlphaSplitting = false;
|
||||||
|
s_IOS.overridden = true;
|
||||||
|
importer.SetPlatformTextureSettings(s_IOS);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void SetBGSingle(TextureImporter importer)
|
||||||
|
{
|
||||||
|
importer.spritePackingTag = string.Empty;
|
||||||
|
|
||||||
|
TextureImporterSettings importerSettings = new TextureImporterSettings();
|
||||||
|
importer.ReadTextureSettings(importerSettings);
|
||||||
|
importerSettings.npotScale = TextureImporterNPOTScale.None;
|
||||||
|
importerSettings.spriteMode = 1;//Single
|
||||||
|
importerSettings.spritePixelsPerUnit = GameLogic.AppConst.PIXELTOWORLD;
|
||||||
|
importerSettings.mipmapEnabled = false;
|
||||||
|
importerSettings.wrapMode = TextureWrapMode.Clamp;
|
||||||
|
importerSettings.filterMode = FilterMode.Trilinear;
|
||||||
|
importerSettings.alphaIsTransparency = true;
|
||||||
|
importer.SetTextureSettings(importerSettings);
|
||||||
|
|
||||||
|
//Android
|
||||||
|
TextureImporterPlatformSettings s_Android = new TextureImporterPlatformSettings();
|
||||||
|
s_Android.name = "Android";
|
||||||
|
s_Android.maxTextureSize = 2048;
|
||||||
|
s_Android.format = TextureImporterFormat.ETC2_RGBA8Crunched;
|
||||||
|
s_Android.compressionQuality = 50;
|
||||||
|
s_Android.allowsAlphaSplitting = false;
|
||||||
|
s_Android.overridden = true;
|
||||||
|
importer.SetPlatformTextureSettings(s_Android);
|
||||||
|
|
||||||
|
//IOS
|
||||||
|
TextureImporterPlatformSettings s_IOS = new TextureImporterPlatformSettings();
|
||||||
|
s_IOS.name = "iPhone";
|
||||||
|
s_IOS.maxTextureSize = 2048;
|
||||||
|
s_IOS.format = TextureImporterFormat.ASTC_RGBA_8x8;
|
||||||
|
s_IOS.compressionQuality = 50;
|
||||||
|
s_IOS.allowsAlphaSplitting = false;
|
||||||
|
s_IOS.overridden = true;
|
||||||
|
importer.SetPlatformTextureSettings(s_IOS);
|
||||||
|
}
|
||||||
|
static void SetBGMultiple(TextureImporter importer)
|
||||||
|
{
|
||||||
|
importer.spritePackingTag = string.Empty;
|
||||||
|
|
||||||
|
TextureImporterSettings importerSettings = new TextureImporterSettings();
|
||||||
|
importer.ReadTextureSettings(importerSettings);
|
||||||
|
importerSettings.npotScale = TextureImporterNPOTScale.None;
|
||||||
|
importerSettings.spriteMode = 2;//Multiple
|
||||||
|
importerSettings.spritePixelsPerUnit = GameLogic.AppConst.PIXELTOWORLD;
|
||||||
|
importerSettings.mipmapEnabled = false;
|
||||||
|
importerSettings.wrapMode = TextureWrapMode.Clamp;
|
||||||
|
importerSettings.filterMode = FilterMode.Trilinear;
|
||||||
|
importerSettings.alphaIsTransparency = true;
|
||||||
|
importer.SetTextureSettings(importerSettings);
|
||||||
|
|
||||||
|
//Android
|
||||||
|
TextureImporterPlatformSettings s_Android = new TextureImporterPlatformSettings();
|
||||||
|
s_Android.name = "Android";
|
||||||
|
s_Android.maxTextureSize = 2048;
|
||||||
|
s_Android.format = TextureImporterFormat.ETC2_RGBA8Crunched;
|
||||||
|
s_Android.compressionQuality = 50;
|
||||||
|
s_Android.allowsAlphaSplitting = false;
|
||||||
|
s_Android.overridden = true;
|
||||||
|
importer.SetPlatformTextureSettings(s_Android);
|
||||||
|
|
||||||
|
//IOS
|
||||||
|
TextureImporterPlatformSettings s_IOS = new TextureImporterPlatformSettings();
|
||||||
|
s_IOS.name = "iPhone";
|
||||||
|
s_IOS.maxTextureSize = 2048;
|
||||||
|
s_IOS.format = TextureImporterFormat.ASTC_RGBA_8x8;
|
||||||
|
s_IOS.compressionQuality = 50;
|
||||||
|
s_IOS.allowsAlphaSplitting = false;
|
||||||
|
s_IOS.overridden = true;
|
||||||
|
importer.SetPlatformTextureSettings(s_IOS);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void SetSpineTexture(TextureImporter importer)
|
||||||
|
{
|
||||||
|
importer.spritePackingTag = string.Empty;
|
||||||
|
|
||||||
|
TextureImporterSettings importerSettings = new TextureImporterSettings();
|
||||||
|
importer.ReadTextureSettings(importerSettings);
|
||||||
|
importerSettings.npotScale = TextureImporterNPOTScale.None;
|
||||||
|
importerSettings.spriteMode = 1;//Single
|
||||||
|
importerSettings.spritePixelsPerUnit = GameLogic.AppConst.PIXELTOWORLD;
|
||||||
|
importerSettings.mipmapEnabled = false;
|
||||||
|
importerSettings.wrapMode = TextureWrapMode.Clamp;
|
||||||
|
importerSettings.filterMode = FilterMode.Trilinear;
|
||||||
|
importerSettings.alphaIsTransparency = true;
|
||||||
|
importer.SetTextureSettings(importerSettings);
|
||||||
|
|
||||||
|
//Android
|
||||||
|
TextureImporterPlatformSettings s_Android = new TextureImporterPlatformSettings();
|
||||||
|
s_Android.name = "Android";
|
||||||
|
s_Android.maxTextureSize = 2048;
|
||||||
|
s_Android.format = TextureImporterFormat.ASTC_RGBA_5x5;
|
||||||
|
s_Android.compressionQuality = 50;
|
||||||
|
s_Android.allowsAlphaSplitting = false;
|
||||||
|
s_Android.overridden = true;
|
||||||
|
importer.SetPlatformTextureSettings(s_Android);
|
||||||
|
|
||||||
|
//IOS
|
||||||
|
TextureImporterPlatformSettings s_IOS = new TextureImporterPlatformSettings();
|
||||||
|
s_IOS.name = "iPhone";
|
||||||
|
s_IOS.maxTextureSize = 2048;
|
||||||
|
s_IOS.format = TextureImporterFormat.ASTC_RGBA_5x5;
|
||||||
|
s_IOS.compressionQuality = 50;
|
||||||
|
s_IOS.allowsAlphaSplitting = false;
|
||||||
|
s_IOS.overridden = true;
|
||||||
|
importer.SetPlatformTextureSettings(s_IOS);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue