@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 8a23b57531c711044a3673e71ad539bb |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
interface EffectRangeHandler |
|||
{ |
|||
public List<MapUnity> HandleAngleWithResult(float angle) { return new List<MapUnity>(); } |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 69f7bbdc311a20f408557dcf8b3b6da1 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,57 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandler2 : EffectRangeHandlerBase |
|||
{ |
|||
public EffectRangeHandler2(MapUnity currentNode, float euler) |
|||
{ |
|||
influencePreviewPool.Clear(); |
|||
influencePreviewPool.Add(currentNode); |
|||
angleActions = new Dictionary<float, Func<List<MapUnity>>> |
|||
{ |
|||
{ 30.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 90.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 150.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 210.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 270.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 330.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1]); |
|||
return influencePreviewPool; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 6b9df673ab6b6654794ec44e60a21a68 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,72 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandler3_1 : EffectRangeHandlerBase |
|||
{ |
|||
public EffectRangeHandler3_1(MapUnity currentNode, float euler) |
|||
{ |
|||
influencePreviewPool.Clear(); |
|||
influencePreviewPool.Add(currentNode); |
|||
angleActions = new Dictionary<float, Func<List<MapUnity>>> |
|||
{ |
|||
{ 30.0f, () => |
|||
{ |
|||
if(tryGetNodeInfluencedable(currentNode.unitPool[2])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2].unitPool[2]); |
|||
}; |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 90.0f, () => |
|||
{ |
|||
if(tryGetNodeInfluencedable(currentNode.unitPool[3])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3].unitPool[3]); |
|||
}; |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 150.0f, () => |
|||
{ |
|||
if(tryGetNodeInfluencedable(currentNode.unitPool[4])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4].unitPool[4]); |
|||
}; |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 210.0f, () => |
|||
{ |
|||
if(tryGetNodeInfluencedable(currentNode.unitPool[5])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5].unitPool[5]); |
|||
}; |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 270.0f, () => |
|||
{ |
|||
if(tryGetNodeInfluencedable(currentNode.unitPool[0])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0].unitPool[0]); |
|||
}; |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 330.0f, () => |
|||
{ |
|||
if(tryGetNodeInfluencedable(currentNode.unitPool[1])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1].unitPool[1]); |
|||
}; |
|||
return influencePreviewPool; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: e69d436df9e59ac43964a510d554896e |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,59 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandler3_2 : EffectRangeHandlerBase |
|||
{ |
|||
public EffectRangeHandler3_2(MapUnity currentNode, float euler) |
|||
{ |
|||
influencePreviewPool.Clear(); |
|||
influencePreviewPool.Add(currentNode); |
|||
angleActions = new Dictionary<float, Func<List<MapUnity>>> |
|||
{ |
|||
{ 30.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 90.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 150.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 210.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 270.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 330.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3]); |
|||
return influencePreviewPool; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: f95992a268d811b4cb2e60f390074d4a |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,60 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandler3_3 : EffectRangeHandlerBase |
|||
{ |
|||
public EffectRangeHandler3_3(MapUnity currentNode, float euler) |
|||
{ |
|||
influencePreviewPool.Clear(); |
|||
influencePreviewPool.Add(currentNode); |
|||
angleActions = new Dictionary<float, Func<List<MapUnity>>> |
|||
{ |
|||
{ 30.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 90.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 150.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 210.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 270.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 330.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2]); |
|||
return influencePreviewPool; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: cc1a3054db3c5684581b5f3a16ef05d2 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,89 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandler4_1 : EffectRangeHandlerBase |
|||
{ |
|||
public EffectRangeHandler4_1(MapUnity currentNode, float euler) |
|||
{ |
|||
influencePreviewPool.Clear(); |
|||
influencePreviewPool.Add(currentNode); |
|||
angleActions = new Dictionary<float, Func<List<MapUnity>>> |
|||
{ |
|||
{ 30.0f, () => |
|||
{ |
|||
if(tryGetNodeInfluencedable(currentNode.unitPool[2])) |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[2].unitPool[2])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2].unitPool[2].unitPool[2]); |
|||
} |
|||
}; |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 90.0f, () => |
|||
{ |
|||
if(tryGetNodeInfluencedable(currentNode.unitPool[3])) |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[3].unitPool[3])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3].unitPool[3].unitPool[3]); |
|||
} |
|||
}; |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 150.0f, () => |
|||
{ |
|||
if(tryGetNodeInfluencedable(currentNode.unitPool[4])) |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[4].unitPool[4])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4].unitPool[4].unitPool[4]); |
|||
} |
|||
}; |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 210.0f, () => |
|||
{ |
|||
if(tryGetNodeInfluencedable(currentNode.unitPool[5])) |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[5].unitPool[5])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5].unitPool[5].unitPool[5]); |
|||
} |
|||
}; |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 270.0f, () => |
|||
{ |
|||
if(tryGetNodeInfluencedable(currentNode.unitPool[0])) |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[0].unitPool[0])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0].unitPool[0].unitPool[0]); |
|||
} |
|||
}; |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 330.0f, () => |
|||
{ |
|||
if(tryGetNodeInfluencedable(currentNode.unitPool[1])) |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[1].unitPool[1])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1].unitPool[1].unitPool[1]); |
|||
} |
|||
}; |
|||
return influencePreviewPool; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: c12b1b2739ddb4b4c84423bfce4e4fad |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,66 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandler4_2 : EffectRangeHandlerBase |
|||
{ |
|||
// Start is called before the first frame update
|
|||
public EffectRangeHandler4_2(MapUnity currentNode, float euler) |
|||
{ |
|||
influencePreviewPool.Clear(); |
|||
influencePreviewPool.Add(currentNode); |
|||
angleActions = new Dictionary<float, Func<List<MapUnity>>> |
|||
{ |
|||
{ 30.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 90.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 150.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 210.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 270.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 330.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1]); |
|||
return influencePreviewPool; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: fedc0bf313dccd0488a95a873c7d6d81 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,66 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandler4_3 : EffectRangeHandlerBase |
|||
{ |
|||
public EffectRangeHandler4_3(MapUnity currentNode, float euler) |
|||
{ |
|||
influencePreviewPool.Clear(); |
|||
influencePreviewPool.Add(currentNode); |
|||
angleActions = new Dictionary<float, Func<List<MapUnity>>> |
|||
{ |
|||
{ 30.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 90.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 150.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 210.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 270.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 330.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1]); |
|||
return influencePreviewPool; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: c89eb1cca69e73448b432e97264487e5 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,71 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandler5_1 : EffectRangeHandlerBase |
|||
{ |
|||
public EffectRangeHandler5_1(MapUnity currentNode, float euler) |
|||
{ |
|||
influencePreviewPool.Clear(); |
|||
influencePreviewPool.Add(currentNode); |
|||
angleActions = new Dictionary<float, Func<List<MapUnity>>> |
|||
{ |
|||
{ 30.0f, () => |
|||
{ |
|||
get5_1Node(currentNode,2); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 90.0f, () => |
|||
{ |
|||
get5_1Node(currentNode,3); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 150.0f, () => |
|||
{ |
|||
get5_1Node(currentNode,4); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 210.0f, () => |
|||
{ |
|||
get5_1Node(currentNode,5); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 270.0f, () => |
|||
{ |
|||
get5_1Node(currentNode,0); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 330.0f, () => |
|||
{ |
|||
get5_1Node(currentNode,1); |
|||
return influencePreviewPool; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
private void get5_1Node(MapUnity currentNode,int angle) |
|||
{ |
|||
MapUnity currentCheckNode= currentNode; |
|||
for (int i=0; i < 4; i++) |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentCheckNode.unitPool[angle])) |
|||
{ |
|||
currentCheckNode= currentCheckNode.unitPool[angle]; |
|||
} |
|||
else |
|||
{ |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: d12cd3aaefee0d84f995c3a3559fcc86 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,72 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandler5_2 : EffectRangeHandlerBase |
|||
{ |
|||
|
|||
public EffectRangeHandler5_2(MapUnity currentNode, float euler) |
|||
{ |
|||
influencePreviewPool.Clear(); |
|||
influencePreviewPool.Add(currentNode); |
|||
angleActions = new Dictionary<float, Func<List<MapUnity>>> |
|||
{ |
|||
{ 30.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 90.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 150.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 210.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 270.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2]); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 330.0f, () => |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3]); |
|||
return influencePreviewPool; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 94b4b09efbde8d24abc3872b4e44eaa3 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,95 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandler5_3 : EffectRangeHandlerBase |
|||
{ |
|||
public EffectRangeHandler5_3(MapUnity currentNode, float euler) |
|||
{ |
|||
influencePreviewPool.Clear(); |
|||
influencePreviewPool.Add(currentNode); |
|||
angleActions = new Dictionary<float, Func<List<MapUnity>>> |
|||
{ |
|||
{ 30.0f, () => |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[0])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0].unitPool[0]); |
|||
} |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[4])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4].unitPool[4]); |
|||
} |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 90.0f, () => |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[1])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1].unitPool[1]); |
|||
} |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[5])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5].unitPool[5]); |
|||
} |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 150.0f, () => |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[2])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2].unitPool[2]); |
|||
} |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[0])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[0].unitPool[0]); |
|||
} |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 210.0f, () => |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[3])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3].unitPool[3]); |
|||
} |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[1])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[1].unitPool[1]); |
|||
} |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 270.0f, () => |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[4])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[4].unitPool[4]); |
|||
} |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[2])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[2].unitPool[2]); |
|||
} |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 330.0f, () => |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[5])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[5].unitPool[5]); |
|||
} |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[3])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[3].unitPool[3]); |
|||
} |
|||
return influencePreviewPool; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 6348d10811fd5604ead921e49aefd79f |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,72 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandler6_1 : EffectRangeHandlerBase |
|||
{ |
|||
|
|||
public EffectRangeHandler6_1(MapUnity currentNode, float euler) |
|||
{ |
|||
influencePreviewPool.Clear(); |
|||
influencePreviewPool.Add(currentNode); |
|||
angleActions = new Dictionary<float, Func<List<MapUnity>>> |
|||
{ |
|||
{ 30.0f, () => |
|||
{ |
|||
get6_1Node(currentNode,2); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 90.0f, () => |
|||
{ |
|||
get6_1Node(currentNode,3); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 150.0f, () => |
|||
{ |
|||
get6_1Node(currentNode,4); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 210.0f, () => |
|||
{ |
|||
get6_1Node(currentNode,5); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 270.0f, () => |
|||
{ |
|||
get6_1Node(currentNode,0); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 330.0f, () => |
|||
{ |
|||
get6_1Node(currentNode,1); |
|||
return influencePreviewPool; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
private void get6_1Node(MapUnity currentNode, int angle) |
|||
{ |
|||
MapUnity currentCheckNode = currentNode; |
|||
for (int i = 0; i < 5; i++) |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentCheckNode.unitPool[angle])) |
|||
{ |
|||
currentCheckNode = currentCheckNode.unitPool[angle]; |
|||
} |
|||
else |
|||
{ |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 4673ba2234bcef54bbedbd3cab1bcc33 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,70 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandler6_2 : EffectRangeHandlerBase |
|||
{ |
|||
|
|||
private ZeroToFiveCircularCounter counter=new ZeroToFiveCircularCounter(); |
|||
public EffectRangeHandler6_2(MapUnity currentNode, float euler) |
|||
{ |
|||
influencePreviewPool.Clear(); |
|||
influencePreviewPool.Add(currentNode); |
|||
angleActions = new Dictionary<float, Func<List<MapUnity>>> |
|||
{ |
|||
{ 30.0f, () => |
|||
{ |
|||
get6_2Node(currentNode,2); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 90.0f, () => |
|||
{ |
|||
get6_2Node(currentNode,3); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 150.0f, () => |
|||
{ |
|||
get6_2Node(currentNode,4); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 210.0f, () => |
|||
{ |
|||
get6_2Node(currentNode,5); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 270.0f, () => |
|||
{ |
|||
get6_2Node(currentNode,0); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 330.0f, () => |
|||
{ |
|||
get6_2Node(currentNode,1); |
|||
return influencePreviewPool; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
} |
|||
|
|||
|
|||
private void get6_2Node(MapUnity currentNode,int value) |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[counter.Subtract(value,2)])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[counter.Subtract(value, 2)].unitPool[value]); |
|||
} |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[counter.Add(value,2)])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[counter.Add(value, 2)].unitPool[value]); |
|||
} |
|||
tryGetNodeInfluencedable(currentNode.unitPool[value]); |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 44c1c0e6762966548ad8cbc42d735b26 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,61 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandler6_3 : EffectRangeHandlerBase |
|||
{ |
|||
public EffectRangeHandler6_3(MapUnity currentNode, float euler) |
|||
{ |
|||
influencePreviewPool.Clear(); |
|||
angleActions = new Dictionary<float, Func<List<MapUnity>>> |
|||
{ |
|||
{ 30.0f, () => |
|||
{ |
|||
get6_3Node(currentNode); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 90.0f, () => |
|||
{ |
|||
get6_3Node(currentNode); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 150.0f, () => |
|||
{ |
|||
get6_3Node(currentNode); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 210.0f, () => |
|||
{ |
|||
get6_3Node(currentNode); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 270.0f, () => |
|||
{ |
|||
get6_3Node(currentNode); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 330.0f, () => |
|||
{ |
|||
get6_3Node(currentNode); |
|||
return influencePreviewPool; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
} |
|||
|
|||
|
|||
private void get6_3Node(MapUnity currentNode) |
|||
{ |
|||
for (int i = 0; i < 6; i++) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[i]); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 0af6a30bba841b44ea5d916c03214257 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,70 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandler7_1 : EffectRangeHandlerBase |
|||
{ |
|||
public EffectRangeHandler7_1(MapUnity currentNode, float euler) |
|||
{ |
|||
influencePreviewPool.Clear(); |
|||
influencePreviewPool.Add(currentNode); |
|||
angleActions = new Dictionary<float, Func<List<MapUnity>>> |
|||
{ |
|||
{ 30.0f, () => |
|||
{ |
|||
get5_1Node(currentNode,2); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 90.0f, () => |
|||
{ |
|||
get5_1Node(currentNode,3); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 150.0f, () => |
|||
{ |
|||
get5_1Node(currentNode,4); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 210.0f, () => |
|||
{ |
|||
get5_1Node(currentNode,5); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 270.0f, () => |
|||
{ |
|||
get5_1Node(currentNode,0); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 330.0f, () => |
|||
{ |
|||
get5_1Node(currentNode,1); |
|||
return influencePreviewPool; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
} |
|||
|
|||
|
|||
private void get5_1Node(MapUnity currentNode, int angle) |
|||
{ |
|||
MapUnity currentCheckNode = currentNode; |
|||
for (int i = 0; i < 6; i++) |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentCheckNode.unitPool[angle])) |
|||
{ |
|||
currentCheckNode = currentCheckNode.unitPool[angle]; |
|||
} |
|||
else |
|||
{ |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: c6bbb05d3be151a4587f97878365269d |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,87 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandler7_2 : EffectRangeHandlerBase |
|||
{ |
|||
|
|||
private ZeroToFiveCircularCounter counter = new ZeroToFiveCircularCounter(); |
|||
public EffectRangeHandler7_2(MapUnity currentNode, float euler) |
|||
{ |
|||
influencePreviewPool.Clear(); |
|||
influencePreviewPool.Add(currentNode); |
|||
angleActions = new Dictionary<float, Func<List<MapUnity>>> |
|||
{ |
|||
{ 30.0f, () => |
|||
{ |
|||
get7_2Node(currentNode,2); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 90.0f, () => |
|||
{ |
|||
get7_2Node(currentNode,3); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 150.0f, () => |
|||
{ |
|||
get7_2Node(currentNode,4); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 210.0f, () => |
|||
{ |
|||
get7_2Node(currentNode,5); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 270.0f, () => |
|||
{ |
|||
get7_2Node(currentNode,0); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 330.0f, () => |
|||
{ |
|||
get7_2Node(currentNode,1); |
|||
return influencePreviewPool; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
} |
|||
|
|||
|
|||
private void get7_2Node(MapUnity currentNode, int value) |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[counter.Subtract(value, 1)])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[counter.Subtract(value, 1)].unitPool[value]); |
|||
} |
|||
if (tryGetNodeInfluencedable(currentNode.unitPool[counter.Add(value, 1)])) |
|||
{ |
|||
tryGetNodeInfluencedable(currentNode.unitPool[counter.Add(value, 1)].unitPool[value]); |
|||
} |
|||
getongNode(currentNode, value); |
|||
|
|||
} |
|||
|
|||
|
|||
private void getongNode(MapUnity currentNode, int angle) |
|||
{ |
|||
MapUnity currentCheckNode = currentNode; |
|||
for (int i = 0; i < 2; i++) |
|||
{ |
|||
if (tryGetNodeInfluencedable(currentCheckNode.unitPool[angle])) |
|||
{ |
|||
currentCheckNode = currentCheckNode.unitPool[angle]; |
|||
} |
|||
else |
|||
{ |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: d35504d31c482e4469d49b8a79828a35 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,132 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandler8_1 : EffectRangeHandler |
|||
{ |
|||
// Start is called before the first frame update
|
|||
public float Epsilon { get; } = 1.00f; |
|||
|
|||
private float euler; |
|||
|
|||
private MapUnity currentNode; |
|||
|
|||
public List<MapUnity> influencePreviewPool = new List<MapUnity>();//卡牌的影响范围
|
|||
|
|||
private readonly Dictionary<float, Func<List<MapUnity>>> angleActions; |
|||
|
|||
private ZeroToFiveCircularCounter counter = new ZeroToFiveCircularCounter(); |
|||
public EffectRangeHandler8_1(MapUnity currentNode, float euler) |
|||
{ |
|||
influencePreviewPool.Clear(); |
|||
this.currentNode = currentNode; |
|||
this.euler = euler; |
|||
influencePreviewPool.Add(currentNode); |
|||
angleActions = new Dictionary<float, Func<List<MapUnity>>> |
|||
{ |
|||
{ 30.0f, () => |
|||
{ |
|||
ge8_1Node(currentNode,2); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 90.0f, () => |
|||
{ |
|||
ge8_1Node(currentNode,3); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 150.0f, () => |
|||
{ |
|||
ge8_1Node(currentNode,4); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 210.0f, () => |
|||
{ |
|||
ge8_1Node(currentNode,5); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 270.0f, () => |
|||
{ |
|||
ge8_1Node(currentNode,0); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 330.0f, () => |
|||
{ |
|||
ge8_1Node(currentNode,1); |
|||
return influencePreviewPool; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
} |
|||
|
|||
|
|||
public List<MapUnity> HandleAngleWithResult(float angle) |
|||
{ |
|||
foreach (var kvp in angleActions) |
|||
{ |
|||
if (Math.Abs(angle - kvp.Key) < Epsilon) |
|||
{ |
|||
return kvp.Value(); |
|||
} |
|||
} |
|||
return influencePreviewPool; |
|||
} |
|||
|
|||
public bool tryGetNodeInfluencedable(MapUnity currentNode) |
|||
{ |
|||
bool canPass = true; |
|||
if (currentNode == null) |
|||
{ |
|||
canPass = false; |
|||
return canPass; |
|||
} |
|||
//Debug.Log("坐标X"+currentNode.locationX+ "坐标Y" + currentNode.locationY);
|
|||
if (currentNode.TryGetComponent<EnemyNode>(out EnemyNode enemyNode)) |
|||
{ |
|||
Debug.Log("JJKK"); |
|||
if (enemyNode.enemyType == EnemyNode.EnemyType.block) |
|||
{ |
|||
Debug.Log("AABB"); |
|||
canPass = false; |
|||
influencePreviewPool.Add(currentNode); |
|||
} |
|||
Debug.Log("DDFF"); |
|||
} |
|||
|
|||
if (canPass) |
|||
{ |
|||
influencePreviewPool.Add(currentNode); |
|||
} |
|||
return canPass; |
|||
} |
|||
|
|||
private void ge8_1Node(MapUnity currentNode, int value) |
|||
{ |
|||
try |
|||
{ |
|||
|
|||
tryGetNodeInfluencedable(currentNode.unitPool[counter.Subtract(value, 2)]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[counter.Subtract(value, 2)].unitPool[counter.Subtract(value, 2)]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[counter.Add(value, 2)]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[counter.Add(value, 2)].unitPool[counter.Add(value, 2)]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[value]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[counter.Subtract(value, 1)]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[value].unitPool[counter.Subtract(value, 2)].unitPool[counter.Subtract(value, 2)]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[counter.Add(value, 1)]); |
|||
tryGetNodeInfluencedable(currentNode.unitPool[value].unitPool[counter.Add(value, 2)].unitPool[counter.Add(value, 2)]); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
//nothing to do
|
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: d0ecdbe96d2d1ec45b7d51b5ea18cd06 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,118 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using TreeEditor; |
|||
using UnityEditor.Experimental.GraphView; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandler8_2 : EffectRangeHandlerBase |
|||
{ |
|||
|
|||
public EffectRangeHandler8_2(MapUnity currentNode, float euler) |
|||
{ |
|||
influencePreviewPool.Clear(); |
|||
angleActions = new Dictionary<float, Func<List<MapUnity>>> |
|||
{ |
|||
{ 30.0f, () => |
|||
{ |
|||
get8_2Node(currentNode,influencePreviewPool); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 90.0f, () => |
|||
{ |
|||
get8_2Node(currentNode,influencePreviewPool); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 150.0f, () => |
|||
{ |
|||
get8_2Node(currentNode,influencePreviewPool); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 210.0f, () => |
|||
{ |
|||
get8_2Node(currentNode,influencePreviewPool); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 270.0f, () => |
|||
{ |
|||
get8_2Node(currentNode,influencePreviewPool); |
|||
return influencePreviewPool; |
|||
} |
|||
}, |
|||
{ 330.0f, () => |
|||
{ |
|||
get8_2Node(currentNode,influencePreviewPool); |
|||
return influencePreviewPool; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
} |
|||
|
|||
|
|||
public bool tryGetNodeInfluencedableList(MapUnity node,List<MapUnity> nodeList) |
|||
{ |
|||
bool canPass = true; |
|||
if (node == null) |
|||
{ |
|||
canPass = false; |
|||
return canPass; |
|||
} |
|||
Debug.Log("坐标X" + node.locationX + "坐标Y" + node.locationY); |
|||
if (node.TryGetComponent<EnemyNode>(out EnemyNode enemyNode)) |
|||
{ |
|||
Debug.Log("JJKK"); |
|||
if (enemyNode.enemyType == EnemyNode.EnemyType.block) |
|||
{ |
|||
Debug.Log("AABB"); |
|||
canPass = false; |
|||
nodeList.Add(node); |
|||
} |
|||
Debug.Log("DDFF"); |
|||
} |
|||
|
|||
if (canPass) |
|||
{ |
|||
nodeList.Add(node); |
|||
} |
|||
return canPass; |
|||
} |
|||
|
|||
|
|||
private void get8_2Node(MapUnity node, List<MapUnity> influencePreviewPool) |
|||
{ |
|||
influencePreviewPool.Add(node); |
|||
getNearbyNode(influencePreviewPool); |
|||
getNearbyNode(influencePreviewPool); |
|||
getNearbyNode(influencePreviewPool); |
|||
while (influencePreviewPool.Contains(node)) |
|||
{ |
|||
influencePreviewPool.Remove(node); |
|||
} |
|||
} |
|||
|
|||
public void getNearbyNode(List<MapUnity> nodeList) |
|||
{ |
|||
// 创建一个副本以避免遍历时修改原集合
|
|||
List<MapUnity> nodesCopy = new List<MapUnity>(nodeList); |
|||
List<MapUnity> nodesToAdd = new List<MapUnity>(); // 临时列表存储要添加的节点
|
|||
|
|||
foreach (var node in nodesCopy) |
|||
{ |
|||
for (int i = 0; i < 6; i++) |
|||
{ |
|||
tryGetNodeInfluencedableList(node.unitPool[i], nodesToAdd); |
|||
} |
|||
} |
|||
|
|||
// 遍历完成后统一修改原集合
|
|||
nodeList.AddRange(nodesToAdd); |
|||
|
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 59788a2dffefa7d46a9fb6dc213ce6f4 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,57 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRangeHandlerBase : EffectRangeHandler |
|||
{ |
|||
public List<MapUnity> influencePreviewPool = new List<MapUnity>();//卡牌的影响范围
|
|||
|
|||
public Dictionary<float, Func<List<MapUnity>>> angleActions; |
|||
|
|||
public float Epsilon { get; } = 1.00f; |
|||
public bool tryGetNodeInfluencedable(MapUnity currentNode) |
|||
{ |
|||
bool canPass = true; |
|||
if (currentNode == null) |
|||
{ |
|||
canPass = false; |
|||
return canPass; |
|||
} |
|||
if (currentNode.TryGetComponent<EnemyNode>(out EnemyNode enemyNode)) |
|||
{ |
|||
Debug.Log("JJKK"); |
|||
if (enemyNode.enemyType == EnemyNode.EnemyType.block) |
|||
{ |
|||
Debug.Log("AABB"); |
|||
canPass = false; |
|||
influencePreviewPool.Add(currentNode); |
|||
} |
|||
Debug.Log("DDFF"); |
|||
} |
|||
|
|||
if (canPass) |
|||
{ |
|||
influencePreviewPool.Add(currentNode); |
|||
} |
|||
return canPass; |
|||
} |
|||
|
|||
public List<MapUnity> HandleAngleWithResult(float angle) |
|||
{ |
|||
Debug.Log("角度大小" + angle); |
|||
foreach (var kvp in angleActions) |
|||
{ |
|||
if (Math.Abs(angle - kvp.Key) < Epsilon) |
|||
{ |
|||
return kvp.Value(); |
|||
} |
|||
} |
|||
Debug.Log("数组大小" + influencePreviewPool.Count); |
|||
return influencePreviewPool; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: a0ccdd1cbd5c03747afb096b65d7783f |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,43 @@ |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class EffectRange |
|||
{ |
|||
|
|||
public const string range1 = "1"; |
|||
|
|||
public const string range2 = "2"; |
|||
|
|||
public const string range3_1 = "3_1"; |
|||
|
|||
public const string range3_2 = "3_2"; |
|||
|
|||
public const string range3_3 = "3_3"; |
|||
|
|||
public const string range4_1 = "4_1"; |
|||
|
|||
public const string range4_2 = "4_2"; |
|||
|
|||
public const string range4_3 = "4_3"; |
|||
|
|||
public const string range5_1 = "5_1"; |
|||
|
|||
public const string range5_2 = "5_2"; |
|||
|
|||
public const string range5_3 = "5_3"; |
|||
|
|||
public const string range6_1 = "6_1"; |
|||
|
|||
public const string range6_2 = "6_2"; |
|||
|
|||
public const string range6_3 = "6_3"; |
|||
|
|||
public const string range7_1 = "7_1"; |
|||
|
|||
public const string range7_2 = "7_2"; |
|||
|
|||
public const string range8_1 = "8_1"; |
|||
|
|||
public const string range8_2 = "8_2"; |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: beb3d35a6756bdc459d31108282df2a2 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,29 @@ |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class ZeroToFiveCircularCounter |
|||
{ |
|||
private const int MinValue = 0; |
|||
private const int MaxValue = 5; |
|||
|
|||
public int Add(int currentValue, int increment) |
|||
{ |
|||
int newValue = (currentValue + increment) % (MaxValue + 1); |
|||
if (newValue < MinValue) |
|||
{ |
|||
newValue += (MaxValue + 1); |
|||
} |
|||
return newValue; |
|||
} |
|||
|
|||
public int Subtract(int currentValue, int decrement) |
|||
{ |
|||
int newValue = (currentValue - decrement) % (MaxValue + 1); |
|||
if (newValue < MinValue) |
|||
{ |
|||
newValue += (MaxValue + 1); |
|||
} |
|||
return newValue; |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: ff9f8714584c75946a30602d0511fca7 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,27 @@ |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class getNodeTools |
|||
{ |
|||
public bool tryGetNodeInfluencedable(MapUnity currentNode,List<MapUnity> nodeList) |
|||
{ |
|||
bool canPass = true; |
|||
if (currentNode == null) |
|||
{ |
|||
canPass = false; |
|||
} |
|||
else if (currentNode.blocked) |
|||
{ |
|||
canPass = false; |
|||
} |
|||
if (canPass) |
|||
{ |
|||
nodeList.Add(currentNode); |
|||
} |
|||
|
|||
return canPass; |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 13d755d44d63f5842b225090d3280e7f |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
|
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |