minor fixes
This commit is contained in:
parent
6bb16f8757
commit
1977ae6d7c
@ -32,7 +32,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 3205969477031557256}
|
||||
m_Father: {fileID: 7535381195931813741}
|
||||
m_RootOrder: 0
|
||||
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}
|
||||
@ -151,7 +151,7 @@ RectTransform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7535381195931813741}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@ -316,7 +316,7 @@ Canvas:
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_AdditionalShaderChannelsFlag: 25
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 1
|
||||
m_TargetDisplay: 0
|
||||
@ -409,7 +409,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 3258995203638363845}
|
||||
m_Father: {fileID: 7535381195931813741}
|
||||
m_RootOrder: 1
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@ -530,7 +530,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 216367779017151113}
|
||||
m_Father: {fileID: 7535381195931813741}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@ -1011,6 +1011,81 @@ MonoBehaviour:
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &5443873379656075396
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5855551985023584753}
|
||||
- component: {fileID: 3505714345849204007}
|
||||
- component: {fileID: 6130419704230661871}
|
||||
m_Layer: 5
|
||||
m_Name: Back
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5855551985023584753
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5443873379656075396}
|
||||
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: 7535381195931813741}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 1670}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3505714345849204007
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5443873379656075396}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6130419704230661871
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5443873379656075396}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0.14117648}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &6038652171774885714
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1040,6 +1115,7 @@ RectTransform:
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 5855551985023584753}
|
||||
- {fileID: 5093098141183363274}
|
||||
- {fileID: 5296751824509684347}
|
||||
- {fileID: 5296751824694007057}
|
||||
|
@ -52,9 +52,9 @@ namespace Controller
|
||||
|
||||
hexGrid.OnGridLoaded += unitFactory.Spawn;
|
||||
|
||||
var paintedControler = new PaintedController();
|
||||
var paintedController = new PaintedController();
|
||||
|
||||
hexGrid.OnHexPainted += paintedControler.SetHexColors;
|
||||
hexGrid.OnHexPainted += paintedController.SetHexColors;
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,10 +6,15 @@ namespace HexFiled
|
||||
|
||||
public class PaintedController
|
||||
{
|
||||
public static Dictionary<UnitColor, HexCell> unitCurrentCell = new Dictionary<UnitColor, HexCell>();
|
||||
public static Dictionary<UnitColor, HexCell> unitCurrentCell;
|
||||
|
||||
private HexCell _cell;
|
||||
|
||||
public PaintedController()
|
||||
{
|
||||
unitCurrentCell = new Dictionary<UnitColor, HexCell>();
|
||||
}
|
||||
|
||||
public void SetHexColors(HexCell cell)
|
||||
{
|
||||
_cell = cell;
|
||||
|
@ -119,19 +119,7 @@ namespace Units
|
||||
_cell.PaintHex(_data.color);
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
var neighbour = _cell.GetNeighbor((HexDirection)i);
|
||||
neighbour?.PaintHex(_data.color);
|
||||
|
||||
for (int j = 0; j < 6; j++)
|
||||
{
|
||||
var neighbour1 = neighbour?.GetNeighbor((HexDirection)j);
|
||||
neighbour1?.PaintHex(_data.color);
|
||||
|
||||
|
||||
//.PaintHex(_data.color);
|
||||
}
|
||||
|
||||
//.PaintHex(_data.color);
|
||||
_cell.GetNeighbor((HexDirection)i)?.PaintHex(_data.color);
|
||||
}
|
||||
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user