Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev
commit
1136879d55
|
|
@ -5,35 +5,78 @@ using LuaInterface;
|
|||
using System;
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace GameLogic {
|
||||
public static class MEncyptUtil {
|
||||
//
|
||||
//加密/解密
|
||||
//异或加密
|
||||
static byte[] crypt(byte[] data, string key)
|
||||
{
|
||||
int[] ri = new int[data.Length];
|
||||
byte[] cl = System.Text.Encoding.Default.GetBytes(key);
|
||||
for(long i = 0; i<data.Length; i++)
|
||||
byte[] cl = System.Text.Encoding.Default.GetBytes(key);
|
||||
byte[] r = new byte[data.Length];
|
||||
for (long i = 0; i < data.Length; i++)
|
||||
{
|
||||
ri[i] = data[i] ^ cl[i % cl.Length];
|
||||
}
|
||||
byte[] rb = new byte[ri.Length * sizeof(int)];
|
||||
Buffer.BlockCopy(ri, 0, rb, 0, rb.Length);
|
||||
|
||||
|
||||
byte[] r = new byte[ri.Length];
|
||||
int x = 0;
|
||||
for (int i = 0; i < rb.Length; i++)
|
||||
{
|
||||
if(i%4 == 0)
|
||||
if (i % 4 == 0)
|
||||
{
|
||||
r[x++] = rb[i];
|
||||
r[i] = BitConverter.GetBytes(data[i] ^ cl[i % cl.Length])[0];
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
r[i] = data[i];
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
// AES加密
|
||||
static byte[] encryptAES(byte[] data, string key)
|
||||
{
|
||||
RijndaelManaged rij = new RijndaelManaged();
|
||||
rij.Key = System.Text.Encoding.Default.GetBytes(key);
|
||||
rij.Mode = CipherMode.ECB;
|
||||
rij.Padding = PaddingMode.PKCS7;
|
||||
ICryptoTransform ctr = rij.CreateEncryptor();
|
||||
return ctr.TransformFinalBlock(data, 0, data.Length);
|
||||
}
|
||||
static byte[] decryptAES(byte[] data, string key)
|
||||
{
|
||||
RijndaelManaged rij = new RijndaelManaged();
|
||||
rij.Key = System.Text.Encoding.Default.GetBytes(key);
|
||||
rij.Mode = CipherMode.ECB;
|
||||
rij.Padding = PaddingMode.PKCS7;
|
||||
ICryptoTransform ctr = rij.CreateDecryptor();
|
||||
return ctr.TransformFinalBlock(data, 0, data.Length);
|
||||
}
|
||||
|
||||
// 头部混淆
|
||||
static byte[] encryptHead(byte[] data, string key)
|
||||
{
|
||||
byte[] cl = System.Text.Encoding.Default.GetBytes(key);
|
||||
byte[] r = new byte[data.Length + cl.Length];
|
||||
long x = 0;
|
||||
for (long i = 0; i < cl.Length; i++)
|
||||
{
|
||||
r[x++] = cl[i];
|
||||
}
|
||||
for (long i = 0; i < data.Length; i++)
|
||||
{
|
||||
r[x++] = data[i];
|
||||
}
|
||||
return r;
|
||||
}
|
||||
// 头部混淆
|
||||
static byte[] decryptHead(byte[] data, string key)
|
||||
{
|
||||
byte[] cl = System.Text.Encoding.Default.GetBytes(key);
|
||||
byte[] r = new byte[data.Length - cl.Length];
|
||||
long x = 0;
|
||||
for (long i = cl.Length; i < data.Length; i++)
|
||||
{
|
||||
r[x++] = data[i];
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
// 加载AB包
|
||||
|
|
@ -41,18 +84,23 @@ namespace GameLogic {
|
|||
{
|
||||
byte[] rb ;
|
||||
|
||||
//System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
|
||||
//sw.Start();
|
||||
if (key == null || key == "")
|
||||
{
|
||||
rb = data;
|
||||
}
|
||||
else {
|
||||
rb = crypt(data, key);
|
||||
rb = decryptHead(data, key);
|
||||
}
|
||||
//Debug.Log("_"+sw.Elapsed.TotalMilliseconds);
|
||||
byte[] r = new byte[rb.Length - (int)offset];
|
||||
for (int i = (int)offset; i < rb.Length; i++)
|
||||
{
|
||||
r[i - (int)offset] = rb[i];
|
||||
}
|
||||
//Debug.Log("_"+sw.Elapsed.TotalMilliseconds);
|
||||
//sw.Stop();
|
||||
return r;
|
||||
}
|
||||
// 文件加密
|
||||
|
|
@ -72,7 +120,7 @@ namespace GameLogic {
|
|||
return;
|
||||
}
|
||||
byte[] data = File.ReadAllBytes(path);
|
||||
byte[] rb = crypt(data, key);
|
||||
byte[] rb = encryptHead(data, key);
|
||||
|
||||
File.WriteAllBytes(path, rb);
|
||||
}
|
||||
|
|
@ -86,7 +134,10 @@ namespace GameLogic {
|
|||
}
|
||||
else
|
||||
{
|
||||
ab = AssetBundle.LoadFromMemory(GameLogic.MEncyptUtil.DecyptAB(File.ReadAllBytes(path), encryptKey, offset));
|
||||
//ab = AssetBundle.LoadFromMemory(DecyptAB(File.ReadAllBytes(path), encryptKey, offset));
|
||||
if (encryptKey == null) encryptKey = "";
|
||||
byte[] cl = System.Text.Encoding.Default.GetBytes(encryptKey);
|
||||
ab = AssetBundle.LoadFromFile(path, 0, (ulong)(cl.Length + (int)offset));
|
||||
}
|
||||
return ab;
|
||||
}
|
||||
|
|
@ -100,43 +151,78 @@ namespace GameLogic {
|
|||
}
|
||||
else
|
||||
{
|
||||
ab = AssetBundle.LoadFromMemoryAsync(GameLogic.MEncyptUtil.DecyptAB(File.ReadAllBytes(path), encryptKey, offset));
|
||||
//ab = AssetBundle.LoadFromMemoryAsync(DecyptAB(File.ReadAllBytes(path), encryptKey, offset));
|
||||
|
||||
byte[] cl = System.Text.Encoding.Default.GetBytes(encryptKey);
|
||||
ab = AssetBundle.LoadFromFileAsync(path, 0, (ulong)(cl.Length + (int)offset));
|
||||
}
|
||||
return ab;
|
||||
}
|
||||
//[MenuItem("Build/TEST")]
|
||||
//static void load()
|
||||
//{
|
||||
// byte[] a = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
|
||||
// string s = "";
|
||||
// for(int i = 0;i < a.Length; i++)
|
||||
// {
|
||||
// s += a[i];
|
||||
// }
|
||||
// XDebug.Log.l("a = " + s);
|
||||
static void Test()
|
||||
{
|
||||
AssetBundle.UnloadAllAssetBundles(true);
|
||||
System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
|
||||
sw.Start();
|
||||
byte[] b = File.ReadAllBytes("/Users/ljsd/Documents/JieLing/Packager/IOS/TCX_CN_XIPU/Data/Raw/IOS/lz4_atlas_dyact_activity4.unity3d");
|
||||
Debug.Log(sw.Elapsed.TotalMilliseconds);
|
||||
byte[] d = DecyptAB(b, "ae125efkk4_54eeff444ferfkny6oxi8", 128);
|
||||
Debug.Log(sw.Elapsed.TotalMilliseconds);
|
||||
//AssetBundle.LoadFromMemory(d);
|
||||
//Debug.Log(sw.Elapsed.TotalMilliseconds);
|
||||
sw.Stop();
|
||||
|
||||
// //AssetBundle.UnloadAllAssetBundles(true);
|
||||
// //sw.Start();
|
||||
// //AssetBundle.LoadFromFile("/Users/ljsd/Documents/JieLing/UnityProject/JL_china_ios/BuildABs/IOS/lz4_atlas_dyact_activity4.unity3d", 0, 128);
|
||||
// //Debug.Log(sw.Elapsed.TotalMilliseconds);
|
||||
// //sw.Stop();
|
||||
|
||||
|
||||
// //AssetBundle.UnloadAllAssetBundles(true);
|
||||
// //sw.Start();
|
||||
// //byte[] bb = File.ReadAllBytes("/Users/ljsd/Documents/JieLing/UnityProject/JL_china_ios/BuildABs/IOS/lz4_atlas_dyact_activity4.unity3d");
|
||||
// //Debug.Log(sw.Elapsed.TotalMilliseconds);
|
||||
// //byte[] dd = DecyptAB(bb, "", 128);
|
||||
// //Debug.Log(sw.Elapsed.TotalMilliseconds);
|
||||
// //AssetBundle.LoadFromMemory(dd);
|
||||
// //Debug.Log(sw.Elapsed.TotalMilliseconds);
|
||||
// //sw.Stop();
|
||||
|
||||
}
|
||||
//[MenuItem("Build/TEST2")]
|
||||
static void load()
|
||||
{
|
||||
byte[] a = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
|
||||
string s = "";
|
||||
for (int i = 0; i < a.Length; i++)
|
||||
{
|
||||
s += a[i];
|
||||
}
|
||||
XDebug.Log.l("a = " + s);
|
||||
|
||||
|
||||
|
||||
// byte[] b = crypt(a, "key");
|
||||
// s = "";
|
||||
// for (int i = 0; i < b.Length; i++)
|
||||
// {
|
||||
// s += b[i];
|
||||
// }
|
||||
// XDebug.Log.l("b = " + s);
|
||||
byte[] b = encryptHead(a, "ae125efkk4_54eeff444ferfkny6oxi8");
|
||||
s = "";
|
||||
for (int i = 0; i < b.Length; i++)
|
||||
{
|
||||
s += b[i];
|
||||
}
|
||||
XDebug.Log.l("b = " + s);
|
||||
|
||||
|
||||
|
||||
// byte[] c = crypt(b, "key");
|
||||
// s = "";
|
||||
// for (int i = 0; i < c.Length; i++)
|
||||
// {
|
||||
// s += c[i];
|
||||
// }
|
||||
// XDebug.Log.l("c = " + s);
|
||||
byte[] c = decryptHead(b, "ae125efkk4_54eeff444ferfkny6oxi8");
|
||||
s = "";
|
||||
for (int i = 0; i < c.Length; i++)
|
||||
{
|
||||
s += c[i];
|
||||
}
|
||||
XDebug.Log.l("c = " + s);
|
||||
|
||||
|
||||
// //File.ReadAllBytes("");
|
||||
//}
|
||||
//File.ReadAllBytes("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5054,6 +5054,7 @@ RectTransform:
|
|||
- {fileID: 208247563920512486}
|
||||
- {fileID: 1478133659566952327}
|
||||
- {fileID: 6979685406578874528}
|
||||
- {fileID: 6680226171587101182}
|
||||
- {fileID: 2043961333174016206}
|
||||
- {fileID: 2052763838201650754}
|
||||
- {fileID: 3088456174784992059}
|
||||
|
|
@ -14960,6 +14961,80 @@ ParticleSystemRenderer:
|
|||
m_Mesh2: {fileID: 0}
|
||||
m_Mesh3: {fileID: 0}
|
||||
m_MaskInteraction: 0
|
||||
--- !u!1 &1163096677516369895
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 299595285830895849}
|
||||
- component: {fileID: 968871098129697423}
|
||||
- component: {fileID: 2469121043055395424}
|
||||
m_Layer: 5
|
||||
m_Name: Img2
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &299595285830895849
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1163096677516369895}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6680226171587101182}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: -38.8}
|
||||
m_SizeDelta: {x: 117, y: 39}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &968871098129697423
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1163096677516369895}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &2469121043055395424
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1163096677516369895}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 21300000, guid: 27d3e3bfba04a224c9694ce5e6e9c79f, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &1166631468014762931
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -15418,7 +15493,7 @@ RectTransform:
|
|||
- {fileID: 1971531226912261817}
|
||||
- {fileID: 2634665790303701291}
|
||||
m_Father: {fileID: 7581135397323237180}
|
||||
m_RootOrder: 5
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
|
|
@ -35237,7 +35312,7 @@ RectTransform:
|
|||
- {fileID: 4452344794313098835}
|
||||
- {fileID: 8329855622185798631}
|
||||
m_Father: {fileID: 7581135397323237180}
|
||||
m_RootOrder: 6
|
||||
m_RootOrder: 7
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
|
|
@ -40816,6 +40891,100 @@ Animator:
|
|||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorControllerStateOnDisable: 0
|
||||
--- !u!1 &5121633682624462941
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 9171893541478643663}
|
||||
- component: {fileID: 1428778453636457313}
|
||||
- component: {fileID: 5233655276826746282}
|
||||
- component: {fileID: 8588285587988790546}
|
||||
m_Layer: 5
|
||||
m_Name: Img
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &9171893541478643663
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5121633682624462941}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6680226171587101182}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 3.6}
|
||||
m_SizeDelta: {x: 120, y: 101}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1428778453636457313
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5121633682624462941}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &5233655276826746282
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5121633682624462941}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 21300000, guid: f9195d99260587f49a39e815c6ba7bf6, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!95 &8588285587988790546
|
||||
Animator:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5121633682624462941}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000, guid: 5d9ac99b75d220c43ba06f575523555c, type: 2}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorControllerStateOnDisable: 0
|
||||
--- !u!1 &5197284246680073614
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -61070,7 +61239,7 @@ RectTransform:
|
|||
- {fileID: 5439423017807525752}
|
||||
- {fileID: 2092466590503268333}
|
||||
m_Father: {fileID: 7581135397323237180}
|
||||
m_RootOrder: 4
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
|
|
@ -76233,6 +76402,126 @@ MonoBehaviour:
|
|||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &8745388661372296966
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6680226171587101182}
|
||||
- component: {fileID: 6852460667181259617}
|
||||
- component: {fileID: 4256345495411969344}
|
||||
- component: {fileID: 6231140805489773553}
|
||||
m_Layer: 5
|
||||
m_Name: zqbgold
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6680226171587101182
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8745388661372296966}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 9171893541478643663}
|
||||
- {fileID: 299595285830895849}
|
||||
- {fileID: 4738047345300084531}
|
||||
m_Father: {fileID: 7581135397323237180}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -97.5, y: -386.5}
|
||||
m_SizeDelta: {x: 129, y: 126}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6852460667181259617
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8745388661372296966}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &4256345495411969344
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8745388661372296966}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 21300000, guid: de99e18ee6101e146b6d63540708cc25, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!114 &6231140805489773553
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8745388661372296966}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 3
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 4256345495411969344}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
--- !u!1 &8901245275490365540
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -81297,11 +81586,6 @@ PrefabInstance:
|
|||
m_Modification:
|
||||
m_TransformParent: {fileID: 6979685406578874528}
|
||||
m_Modifications:
|
||||
- target: {fileID: 545869090935395574, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Fx_Circle 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
|
|
@ -81407,6 +81691,11 @@ PrefabInstance:
|
|||
propertyPath: m_Pivot.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395574, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Fx_Circle 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: ccf72b26803e0d34cb0033c5bdd37418, type: 3}
|
||||
--- !u!224 &184284645826008713 stripped
|
||||
|
|
@ -81415,3 +81704,128 @@ RectTransform:
|
|||
type: 3}
|
||||
m_PrefabInstance: {fileID: 368702410255057534}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &5067602908007744452
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 6680226171587101182}
|
||||
m_Modifications:
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 545869090935395574, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Fx_Circle 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: ccf72b26803e0d34cb0033c5bdd37418, type: 3}
|
||||
--- !u!224 &4738047345300084531 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 545869090935395575, guid: ccf72b26803e0d34cb0033c5bdd37418,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 5067602908007744452}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
|
|
|||
|
|
@ -5684,23 +5684,28 @@ local passivityList = {
|
|||
return
|
||||
end
|
||||
if skill and skill.owner==role and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra) and target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
||||
local dmg= floor(BattleUtil.ErrorCorrection((damage-finalDmg)*f1))
|
||||
local list = RoleManager.Query(function(v) return v.camp ~= role.camp end)
|
||||
list = BattleUtil.SortByHpFactor(list,0)
|
||||
-- if not list[1]:IsDead() then
|
||||
if list then
|
||||
if not point then
|
||||
point=list[1]
|
||||
end
|
||||
BattleUtil.FinalDamage(nil,role,point,dmg)
|
||||
if curNum>=maxNum then
|
||||
return
|
||||
end
|
||||
if num>0 then
|
||||
BattleUtil.CalRage(role,point,num,CountTypeName.Sub)
|
||||
curNum=curNum+num
|
||||
end
|
||||
end
|
||||
BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime,function()
|
||||
local dmg= floor(BattleUtil.ErrorCorrection((damage-finalDmg)*f1))
|
||||
local list = RoleManager.Query(function(v) return v.camp ~= role.camp end)
|
||||
list = BattleUtil.SortByHpFactor(list,0)
|
||||
-- if not list[1]:IsDead() then
|
||||
if list then
|
||||
if not point then
|
||||
point=list[1]
|
||||
end
|
||||
if point==nil then
|
||||
return
|
||||
end
|
||||
BattleUtil.FinalDamage(nil,role,point,dmg)
|
||||
if curNum>=maxNum then
|
||||
return
|
||||
end
|
||||
if num>0 then
|
||||
BattleUtil.CalRage(role,point,num,CountTypeName.Sub)
|
||||
curNum=curNum+num
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role)
|
||||
|
|
@ -10163,6 +10168,7 @@ local passivityList = {
|
|||
end
|
||||
|
||||
role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffStart,nil,nil,role)
|
||||
end
|
||||
end,
|
||||
|
||||
}
|
||||
return passivityList
|
||||
|
|
@ -27,6 +27,9 @@ end
|
|||
-- 记录承受伤害
|
||||
function NoDead:OnRoleBeHit(atkRole, damage, bCrit, finalDmg, damageType, skill,isDirect)
|
||||
if skill and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill ) and atkRole.camp~=self.target.camp then
|
||||
if self.changePro==nil then
|
||||
self.changePro=0.1
|
||||
end
|
||||
self.recordDamage=self.recordDamage+math.floor(damage*self.changePro)
|
||||
end
|
||||
end
|
||||
|
|
@ -65,6 +68,9 @@ function NoDead:OnEnd()
|
|||
self.target.Event:RemoveEvent(BattleEventName.RoleBeHit,self.OnRoleBeHit,self)
|
||||
end
|
||||
--self.target.Event
|
||||
if self.pro==nil then
|
||||
self.pro=0
|
||||
end
|
||||
local isRand=BattleUtil.RandomAction(self.pro,function()
|
||||
RoleManager.RemoveDeadRole(self.target)
|
||||
self.target.isDead=false
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ function SkillSetView:Show(camp, pos, BattleView)
|
|||
self.rt.text = self.roleView.SkillCaster.actionTime*1000
|
||||
self.rt2.text = self.roleView.SkillCaster.soundTime*1000
|
||||
|
||||
local nCId = BattleManager.GetCombatIdBySkin(nSkillId, 0)
|
||||
local nCId = BattleManager.GetCombatIdBySkin(nSkillId, self.role.roleData.skinId)
|
||||
local nCombat = BattleManager.GetSkillCombat(nCId)
|
||||
self.nt1.text = nCombat.BeforeEffectDelay
|
||||
self.nt2.text = nCombat.KeyFrame
|
||||
|
|
@ -65,7 +65,7 @@ function SkillSetView:Show(camp, pos, BattleView)
|
|||
self.nt5.text = nCombat.SkillDuration
|
||||
self.nt6.text = nCombat.SkillNumber
|
||||
|
||||
local sCId = BattleManager.GetCombatIdBySkin(sSkillId, 0)
|
||||
local sCId = BattleManager.GetCombatIdBySkin(sSkillId, self.role.roleData.skinId)
|
||||
local sCombat = BattleManager.GetSkillCombat(sCId)
|
||||
self.st1.text = sCombat.BeforeEffectDelay
|
||||
self.st2.text = sCombat.KeyFrame
|
||||
|
|
@ -85,7 +85,7 @@ function SkillSetView:ApplyData()
|
|||
self.roleView.SkillCaster.actionTime = (tonumber(self.rt.text)or 0)/1000
|
||||
self.roleView.SkillCaster.soundTime = (tonumber(self.rt2.text)or 0)/1000
|
||||
|
||||
local ncId = BattleManager.GetCombatIdBySkin(nSkillId, 0)
|
||||
local ncId = BattleManager.GetCombatIdBySkin(nSkillId, self.role.roleData.skinId)
|
||||
local nCombat = BattleManager.GetSkillCombat(ncId)
|
||||
local nBeforeEffectDelay = tonumber(self.nt1.text) or 0
|
||||
local nKeyFrame = tonumber(self.nt2.text) or 0
|
||||
|
|
@ -98,13 +98,11 @@ function SkillSetView:ApplyData()
|
|||
nCombat.BeforeEffectDelay = nBeforeEffectDelay
|
||||
nCombat.DamageDelay = nDamageDelay
|
||||
BattleManager.SetSkillCombat(ncId, nCombat)
|
||||
for i=2, #self.role.skill do
|
||||
self.role.skill[2] = nKeyFrame/1000
|
||||
self.role.skill[3] = nSkillDuration/1000
|
||||
self.role.skill[4] = nSkillNumber
|
||||
end
|
||||
self.role.skill[2] = nKeyFrame/1000
|
||||
self.role.skill[3] = nSkillDuration/1000
|
||||
self.role.skill[4] = nSkillNumber
|
||||
|
||||
local scId = BattleManager.GetCombatIdBySkin(sSkillId, 0)
|
||||
local scId = BattleManager.GetCombatIdBySkin(sSkillId, self.role.roleData.skinId)
|
||||
local sCombat = BattleManager.GetSkillCombat(scId)
|
||||
local sBeforeEffectDelay = tonumber(self.st1.text) or 0
|
||||
local sKeyFrame = tonumber(self.st2.text) or 0
|
||||
|
|
@ -117,11 +115,9 @@ function SkillSetView:ApplyData()
|
|||
sCombat.BeforeEffectDelay = sBeforeEffectDelay
|
||||
sCombat.DamageDelay = sDamageDelay
|
||||
BattleManager.SetSkillCombat(scId, sCombat)
|
||||
for i=2, #self.role.superSkill do
|
||||
self.role.superSkill[2] = sKeyFrame/1000
|
||||
self.role.superSkill[3] = sSkillDuration/1000
|
||||
self.role.superSkill[4] = sSkillNumber
|
||||
end
|
||||
self.role.superSkill[2] = sKeyFrame/1000
|
||||
self.role.superSkill[3] = sSkillDuration/1000
|
||||
self.role.superSkill[4] = sSkillNumber
|
||||
|
||||
PopupTipPanel.ShowTip(Language[10212])
|
||||
end
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ function EnemyView:onCreate(go, role, position, root, isBoss,enemyId)
|
|||
self.rageSlider.fillAmount = self.role.Rage / 4
|
||||
self.rageText.gameObject:SetActive(false)
|
||||
self.rageText.text = ""
|
||||
|
||||
self.currAniName="idle"
|
||||
-- 伤害文字显示
|
||||
self.LastBuffFloatingTime = Time.realtimeSinceStartup
|
||||
self.BuffFloatingCount = 0
|
||||
|
|
@ -362,18 +362,23 @@ function EnemyView:SetHighLight(isLight, eScale, dur, func)
|
|||
end), ec, dur):SetEase(Ease.Linear)
|
||||
end
|
||||
|
||||
|
||||
-- 播放动画
|
||||
function EnemyView:PlaySpineAnim(gog, time, name, isLoop)
|
||||
|
||||
if isLoop then
|
||||
gog.AnimationState:SetAnimation(time, name, isLoop)
|
||||
self.currAniName=name
|
||||
else
|
||||
local _complete = nil
|
||||
_complete = function(state)
|
||||
gog.AnimationState.Complete = gog.AnimationState.Complete - _complete
|
||||
gog.AnimationState:SetAnimation(0, "idle", true)
|
||||
self.currAniName="idle"
|
||||
end
|
||||
gog.AnimationState:ClearTracks() -- 清除上一个动画的影响(修复概率攻击动画播放错误的问题)
|
||||
gog.AnimationState:SetAnimation(time, name, isLoop)
|
||||
self.currAniName=name
|
||||
gog.AnimationState.Complete = gog.AnimationState.Complete + _complete
|
||||
end
|
||||
end
|
||||
|
|
@ -536,22 +541,30 @@ function EnemyView:DOHitEffect(time, func)
|
|||
if not time or time < 0.3 then
|
||||
time = 0.3
|
||||
end
|
||||
-- 受击放大1.2倍
|
||||
self:DoScale(1.2, 0.1)
|
||||
-- 卡面变红
|
||||
self.RoleLiveGOGraphic:DOColor(Color.New(1,0,0,1), 0.1):OnComplete(function ()
|
||||
self.RoleLiveGOGraphic:DOColor(Color.New(1,1,1,1), 0.1):SetDelay(time)
|
||||
end)
|
||||
-- 震动
|
||||
self.RoleLiveGOTran:DOShakeAnchorPos(time, Vector2.New(200, 100), 100, 50, false, true):OnComplete(function ()
|
||||
self.RoleLiveGO.transform.anchoredPosition = Vector2.New(self.outOffset[1], self.outOffset[2] )
|
||||
-- 恢复大小
|
||||
self:DoScale(1, 0.1)
|
||||
if self.currAniName~="idle" and self.currAniName~="hit" then
|
||||
-- 受击放大1.2倍
|
||||
self:DoScale(1.2, 0.1)
|
||||
-- 卡面变红
|
||||
self.RoleLiveGOGraphic:DOColor(Color.New(1,0,0,1), 0.1):OnComplete(function ()
|
||||
self.RoleLiveGOGraphic:DOColor(Color.New(1,1,1,1), 0.1):SetDelay(time)
|
||||
end)
|
||||
-- 震动
|
||||
self.RoleLiveGOTran:DOShakeAnchorPos(time, Vector2.New(200, 100), 100, 50, false, true):OnComplete(function ()
|
||||
self.RoleLiveGO.transform.anchoredPosition = Vector2.New(self.outOffset[1], self.outOffset[2] )
|
||||
-- 恢复大小
|
||||
self:DoScale(1, 0.1)
|
||||
-- 回调
|
||||
if func then
|
||||
func()
|
||||
end
|
||||
end)
|
||||
else
|
||||
-- 回调
|
||||
if func then
|
||||
func()
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -172,6 +172,7 @@ function PlayerView:onCreate(go, role, position, root)
|
|||
else
|
||||
self.lvHpObj:GetComponent("RectTransform").anchoredPosition=Vector3.New(0,0,0)
|
||||
end
|
||||
self.currAniName=""
|
||||
-- 伤害文字显示
|
||||
self.LastBuffFloatingTime = Time.realtimeSinceStartup
|
||||
self.BuffFloatingCount = 0
|
||||
|
|
@ -384,16 +385,20 @@ function PlayerView:SetHighLight(isLight, eScale, dur, func)
|
|||
end
|
||||
|
||||
-- 播放动画
|
||||
|
||||
function PlayerView:PlaySpineAnim(gog, time, name, isLoop)
|
||||
if isLoop then
|
||||
self.currAniName=name
|
||||
gog.AnimationState:SetAnimation(time, name, isLoop)
|
||||
else
|
||||
local _complete = nil
|
||||
_complete = function(state)
|
||||
gog.AnimationState.Complete = gog.AnimationState.Complete - _complete
|
||||
self.currAniName="idle"
|
||||
gog.AnimationState:SetAnimation(0, "idle", true)
|
||||
end
|
||||
gog.AnimationState:ClearTracks() -- 清除上一个动画的影响(修复概率攻击动画播放错误的问题)
|
||||
self.currAniName=name
|
||||
gog.AnimationState:SetAnimation(time, name, isLoop)
|
||||
gog.AnimationState.Complete = gog.AnimationState.Complete + _complete
|
||||
end
|
||||
|
|
@ -443,8 +448,8 @@ function PlayerView:OnSkillEnd()
|
|||
--local cardRenderMat = self.liveRender.material
|
||||
--cardRenderMat:SetInt("_IsMask", 1)
|
||||
-- 动画播放就停止
|
||||
if self.rlgTween2 then self.rlgTween2:Kill() end
|
||||
if self.rlgTween3 then self.rlgTween3:Kill() end
|
||||
--if self.rlgTween2 then self.rlgTween2:Kill() end
|
||||
--if self.rlgTween3 then self.rlgTween3:Kill() end
|
||||
--self.RoleLiveParnet.transform.localScale = Vector3.one --Vector2.New(self.offset[1], self.offset[2])
|
||||
--self.RoleLiveParnet.transform.localPosition = Vector3(0, 0, 0)
|
||||
--self.liveRender.transform.anchoredPosition = Vector2.zero--Vector2.New(self.offset[1], self.offset[2])
|
||||
|
|
@ -595,35 +600,42 @@ function PlayerView:DOHitEffect(time, func)
|
|||
if not time or time < 0.3 then
|
||||
time = 0.3
|
||||
end
|
||||
-- 受击放大1.2倍
|
||||
self:DoScale(1.2, 0.1)
|
||||
-- 卡面变红
|
||||
DoTween.To(DG.Tweening.Core.DOGetter_float( function () return 1 end),
|
||||
DG.Tweening.Core.DOSetter_float(function (progress)
|
||||
local color = Color.New(1, progress, progress, 1)
|
||||
Util.SetColor(self.GameObject, color)
|
||||
Util.SetColor(self.RoleLiveGOGraphic, color)
|
||||
end), 0, 0.1):SetEase(Ease.Linear):OnComplete(function()
|
||||
DoTween.To(DG.Tweening.Core.DOGetter_float( function () return 0 end),
|
||||
if self.currAniName~="idle" and self.currAniName~="hit" then
|
||||
-- 受击放大1.2倍
|
||||
self:DoScale(1.2, 0.1)
|
||||
-- 卡面变红
|
||||
DoTween.To(DG.Tweening.Core.DOGetter_float( function () return 1 end),
|
||||
DG.Tweening.Core.DOSetter_float(function (progress)
|
||||
local color = Color.New(1, progress, progress, 1)
|
||||
Util.SetColor(self.GameObject, color)
|
||||
Util.SetColor(self.RoleLiveGOGraphic, color)
|
||||
end), 1, 0.1):SetEase(Ease.Linear):SetDelay(time)
|
||||
end)
|
||||
-- 震动
|
||||
self.RoleLiveGOTran:DOShakeAnchorPos(time, Vector2.New(200, 100), 100, 50, false, true):OnComplete(function ()
|
||||
self.RoleLiveGOTran.anchoredPosition = Vector2.New(self.outOffset[1], self.outOffset[2] )
|
||||
-- if self.GameObject then
|
||||
-- self.GameObject.transform.parent.anchoredPosition = Vector2.New(self.role.position == 1 and -145 or 0, -221)
|
||||
-- end
|
||||
-- 恢复大小
|
||||
self:DoScale(1, 0.1)
|
||||
-- 回调
|
||||
end), 0, 0.1):SetEase(Ease.Linear):OnComplete(function()
|
||||
DoTween.To(DG.Tweening.Core.DOGetter_float( function () return 0 end),
|
||||
DG.Tweening.Core.DOSetter_float(function (progress)
|
||||
local color = Color.New(1, progress, progress, 1)
|
||||
Util.SetColor(self.GameObject, color)
|
||||
Util.SetColor(self.RoleLiveGOGraphic, color)
|
||||
end), 1, 0.1):SetEase(Ease.Linear):SetDelay(time)
|
||||
end)
|
||||
-- 震动
|
||||
self.RoleLiveGOTran:DOShakeAnchorPos(time, Vector2.New(200, 100), 100, 50, false, true):OnComplete(function ()
|
||||
self.RoleLiveGOTran.anchoredPosition = Vector2.New(self.outOffset[1], self.outOffset[2] )
|
||||
-- if self.GameObject then
|
||||
-- self.GameObject.transform.parent.anchoredPosition = Vector2.New(self.role.position == 1 and -145 or 0, -221)
|
||||
-- end
|
||||
-- 恢复大小
|
||||
self:DoScale(1, 0.1)
|
||||
-- 回调
|
||||
if func then
|
||||
func()
|
||||
end
|
||||
end)
|
||||
else
|
||||
if func then
|
||||
func()
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -944,6 +944,7 @@ local OpenSeverWelfareRewardShow = {
|
|||
[19] = {image1 = "r_guanka_guankajianglishenfu",image2 = "r_guanka_guankajiangli02_zh"},
|
||||
[81128] = {image1 = "r_guanka_guankajianglibaoxiang",image2 = "r_guanka_guankajiangli03_zh"},
|
||||
[11023] = {image1 = "r_guanka_guankajianglishunwukong",image2 = "r_guanka_guankajiangli04_zh"},
|
||||
[87] = {image1 = "r_Material_Mineral_0003",image2 = ""},
|
||||
}
|
||||
function this.UpdateOpenSeverWelfare()
|
||||
local mainLevelConfig = ConfigManager.GetConfig(ConfigName.MainLevelConfig)
|
||||
|
|
@ -965,9 +966,18 @@ function this.UpdateOpenSeverWelfare()
|
|||
end
|
||||
this.btnOpenSeverWelfare:SetActive(isShowBtn)
|
||||
if not curMissionConfig then return end
|
||||
-- 奖励图
|
||||
this.OpenSeverWelfareicon.sprite = this.spLoader:LoadSprite(OpenSeverWelfareRewardShow[curMissionConfig.Reward[1][1]].image1)
|
||||
this.OpenSeverWelfareiconText.sprite = this.spLoader:LoadSprite(OpenSeverWelfareRewardShow[curMissionConfig.Reward[1][1]].image2)
|
||||
this.OpenSeverWelfareicon:SetNativeSize()
|
||||
-- 文字
|
||||
local imgName2 = OpenSeverWelfareRewardShow[curMissionConfig.Reward[1][1]].image2
|
||||
if imgName2 and imgName2 ~= "" then
|
||||
this.OpenSeverWelfareiconText.sprite = this.spLoader:LoadSprite(imgName2)
|
||||
this.OpenSeverWelfareiconText.gameObject:SetActive(true)
|
||||
else
|
||||
this.OpenSeverWelfareiconText.gameObject:SetActive(false)
|
||||
end
|
||||
--
|
||||
local curPassLevelSortId = FightPointPassManager.lastPassFightId ~= FightPointPassManager.curOpenFight and mainLevelConfig[FightPointPassManager.lastPassFightId].SortId or 0
|
||||
local getRewardLevelSortId = mainLevelConfig[curMissionConfig.Values[1][1]].SortId
|
||||
this.OpenSeverWelfareRed:SetActive(curPassLevelSortId >= getRewardLevelSortId)
|
||||
|
|
|
|||
|
|
@ -732,6 +732,8 @@ local jumpDic = {
|
|||
local id2= ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.YiJingBaoKu)
|
||||
if id then
|
||||
JumpManager.GoJump(40050,nil,id2)
|
||||
else
|
||||
this.JumpActivity(JumpType.zhenqibaoge,data[1])
|
||||
end
|
||||
end,
|
||||
[JumpType.LingShouTehui] = function(data)--零售特惠
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ function TailsmanSoulChipLottery:InitComponent()
|
|||
self.zqbgEffect = Util.GetGameObject(self.zhenqibaogeBtn,"Fx_Circle 1")
|
||||
self.btn_soul = Util.GetGameObject(self.rightUp, "btn_hero")
|
||||
self.upSoulImg= Util.GetGameObject(self.btn_soul, "Icon"):GetComponent("Image")
|
||||
|
||||
self.zqbgOldBtn = Util.GetGameObject(self.rightUp,"zqbgold")
|
||||
self.zqbgOldEffect = Util.GetGameObject(self.zqbgOldBtn,"Fx_Circle 1")
|
||||
Util.GetGameObject(self.btn_soul,"InfoImg"):GetComponent("Image").sprite = self.spLoader:LoadSprite("t_tdhl_genghuansuipian")
|
||||
|
||||
self.btns = {}
|
||||
|
|
@ -63,9 +66,12 @@ end
|
|||
--绑定事件(用于子类重写)
|
||||
function TailsmanSoulChipLottery:BindEvent()
|
||||
Util.AddOnceClick(self.zhenqibaogeBtn, function()
|
||||
JumpManager.GoJump(40050,nil,self.actId)
|
||||
end)
|
||||
Util.AddOnceClick(self.zqbgOldBtn, function()
|
||||
JumpManager.GoJump(40011)
|
||||
end)
|
||||
Util.AddOnceClick(self.btnHelp, function()
|
||||
Util.AddOnceClick(self.btnHelp, function()
|
||||
UIManager.OpenPanel(UIName.HelpPopup,self.actConfig.HelpId,self.helpPosition.x,self.helpPosition.y)
|
||||
end)
|
||||
|
||||
|
|
@ -73,11 +79,11 @@ function TailsmanSoulChipLottery:BindEvent()
|
|||
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.RecrutDetail,self.actConfig.HelpId,self.actType,PRE_REWARD_POOL_TYPE.TIANDIHONGLU_UP,PRE_REWARD_POOL_TYPE.TIANDIHONGLU)
|
||||
end)
|
||||
|
||||
Util.AddOnceClick(self.btnStore, function()
|
||||
Util.AddOnceClick(self.btnStore, function()
|
||||
JumpManager.GoJump(40047)
|
||||
end)
|
||||
|
||||
Util.AddOnceClick(self.btn_soul, function()
|
||||
Util.AddOnceClick(self.btn_soul, function()
|
||||
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.chooseTailsManSoul)
|
||||
end)
|
||||
|
||||
|
|
@ -117,6 +123,7 @@ end
|
|||
function TailsmanSoulChipLottery:OnSortingOrderChange(_sortingOrder)
|
||||
sortingOrder = _sortingOrder or 0
|
||||
Util.SetParticleSortLayer(self.zqbgEffect, sortingOrder+1)
|
||||
Util.SetParticleSortLayer(self.zqbgOldEffect, sortingOrder+1)
|
||||
for i = 1, 5 do
|
||||
if self.icons[i] and self.icons[i].effect then
|
||||
Util.SetParticleSortLayer(self.icons[i].effect.gameObject, sortingOrder+1)
|
||||
|
|
@ -129,6 +136,7 @@ function TailsmanSoulChipLottery:OnShow(_sortingOrder)
|
|||
self.gameObject:SetActive(true)
|
||||
sortingOrder = _sortingOrder
|
||||
Util.SetParticleSortLayer(self.zqbgEffect, sortingOrder+1)
|
||||
Util.SetParticleSortLayer(self.zqbgOldEffect, sortingOrder+1)
|
||||
self.actId = self.actConfig.ActId
|
||||
self.actType = self.actConfig.ActiveType > 0 and self.actConfig.ActiveType or self.actConfig.FunType
|
||||
if self.actConfig.IfBack == 1 then
|
||||
|
|
@ -148,6 +156,7 @@ function TailsmanSoulChipLottery:OnShow(_sortingOrder)
|
|||
self.tenRecruit = array[2]
|
||||
self.freeTimesId=self.singleRecruit.FreeTimes
|
||||
self.maxtimesId=self.singleRecruit.MaxTimes
|
||||
CommonActPageManager.ShowIcon(self.zhenqibaogeBtn,self.actId)
|
||||
self:refreshMagicNum()
|
||||
self:refreshBtnShow()--刷新按钮显示
|
||||
self:contentShow()
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ function XunBaoMiZong:Refresh()
|
|||
|
||||
local isActive = CommonActPageManager.HasContinueGift(self.actData.activityId)
|
||||
self.btnGift:SetActive(isActive)
|
||||
CommonActPageManager.ShowIcon(self.zhenqibaogeBtn,self.actData.activityId)
|
||||
|
||||
CompleteMap = self.actData.value == 1
|
||||
CheckRedPointStatus(RedPointType.XunBaoMiZong)
|
||||
|
|
|
|||
Loading…
Reference in New Issue