diff --git a/chess-game-project/Assets/Objects/MovePlate.prefab b/chess-game-project/Assets/Objects/MovePlate.prefab index 0194c24..9d62a46 100644 --- a/chess-game-project/Assets/Objects/MovePlate.prefab +++ b/chess-game-project/Assets/Objects/MovePlate.prefab @@ -100,6 +100,10 @@ MonoBehaviour: m_EditorClassIdentifier: controller: {fileID: 0} attack: 0 + promote: 0 + pecaPromo: Tower + painel: {fileID: 0} + isMenuOpen: 0 --- !u!61 &3764326649180860259 BoxCollider2D: m_ObjectHideFlags: 0 diff --git a/chess-game-project/Assets/Scenes/Game.unity b/chess-game-project/Assets/Scenes/Game.unity index 231219d..83f2a08 100644 --- a/chess-game-project/Assets/Scenes/Game.unity +++ b/chess-game-project/Assets/Scenes/Game.unity @@ -123,6 +123,490 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &190511028 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 190511029} + - component: {fileID: 190511031} + - component: {fileID: 190511030} + m_Layer: 5 + m_Name: PromoText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &190511029 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 190511028} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 493770860} + 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} + m_AnchoredPosition: {x: -0.46, y: 175.98} + m_SizeDelta: {x: 435.52, y: 100.52} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &190511030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 190511028} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: "Se for promover, escolha a pe\xE7a antes:" + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 1 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: -15.257469, y: 0, z: -25.93763, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &190511031 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 190511028} + m_CullTransparentMesh: 1 +--- !u!1 &478892076 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 478892077} + - component: {fileID: 478892080} + - component: {fileID: 478892079} + - component: {fileID: 478892078} + m_Layer: 5 + m_Name: Queen + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &478892077 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 478892076} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1627351291} + m_Father: {fileID: 493770860} + 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: 5.23, y: 49.5} + m_SizeDelta: {x: 298.35, y: 60.31} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &478892078 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 478892076} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + 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_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, 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_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 478892079} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: -7192434741991543191, guid: 715b9167f3bcc58449a4c119ca437a90, type: 3} + m_TargetAssemblyTypeName: MovePlate, Scripts + m_MethodName: PromoteToQueen + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &478892079 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 478892076} + 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: 1, g: 1, b: 1, a: 1} + 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: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + 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!222 &478892080 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 478892076} + m_CullTransparentMesh: 1 +--- !u!1 &491666636 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 491666637} + - component: {fileID: 491666640} + - component: {fileID: 491666639} + - component: {fileID: 491666638} + m_Layer: 5 + m_Name: Bishop + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &491666637 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 491666636} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1222195114} + m_Father: {fileID: 493770860} + 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: 5.23, y: -30.92} + m_SizeDelta: {x: 298.35, y: 60.31} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &491666638 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 491666636} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + 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_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, 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_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 491666639} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: -7192434741991543191, guid: 715b9167f3bcc58449a4c119ca437a90, type: 3} + m_TargetAssemblyTypeName: MovePlate, Scripts + m_MethodName: PromoteToBishop + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &491666639 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 491666636} + 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: 1, g: 1, b: 1, a: 1} + 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: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + 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!222 &491666640 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 491666636} + m_CullTransparentMesh: 1 +--- !u!1 &493770859 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 493770860} + - component: {fileID: 493770863} + - component: {fileID: 493770862} + m_Layer: 5 + m_Name: Panel + m_TagString: Panel + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &493770860 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 493770859} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 478892077} + - {fileID: 491666637} + - {fileID: 606803062} + - {fileID: 1220784191} + - {fileID: 190511029} + m_Father: {fileID: 1261937589} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 680.58, y: 276.42} + m_SizeDelta: {x: -1427.37, y: -578.35} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &493770862 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 493770859} + 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: 1, g: 1, b: 1, a: 0.392} + 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: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + 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!222 &493770863 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 493770859} + m_CullTransparentMesh: 1 --- !u!1 &519420028 GameObject: m_ObjectHideFlags: 0 @@ -287,6 +771,140 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 584682953} m_CullTransparentMesh: 1 +--- !u!1 &606803061 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 606803062} + - component: {fileID: 606803065} + - component: {fileID: 606803064} + - component: {fileID: 606803063} + m_Layer: 5 + m_Name: Tower + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &606803062 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 606803061} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2014358421} + m_Father: {fileID: 493770860} + 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} + m_AnchoredPosition: {x: 5.23, y: -111.35} + m_SizeDelta: {x: 298.35, y: 60.31} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &606803063 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 606803061} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + 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_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, 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_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 606803064} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: -7192434741991543191, guid: 715b9167f3bcc58449a4c119ca437a90, type: 3} + m_TargetAssemblyTypeName: MovePlate, Scripts + m_MethodName: PromoteToTower + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &606803064 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 606803061} + 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: 1, g: 1, b: 1, a: 1} + 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: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + 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!222 &606803065 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 606803061} + m_CullTransparentMesh: 1 --- !u!1 &848132681 GameObject: m_ObjectHideFlags: 0 @@ -362,55 +980,190 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 1261937589} - m_RootOrder: 1 + m_Father: {fileID: 1261937589} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.23952085, y: 0.6254073} + m_AnchorMax: {x: 0.76100004, y: 0.95000005} + m_AnchoredPosition: {x: 0.1800232, y: 1.3099976} + m_SizeDelta: {x: -4.730011, y: -5.1900024} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1085988844 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1085988842} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 80 + m_FontStyle: 3 + m_BestFit: 0 + m_MinSize: 4 + m_MaxSize: 80 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Game Over, aperte para sair. +--- !u!222 &1085988845 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1085988842} + m_CullTransparentMesh: 1 +--- !u!1 &1096132976 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1096132977} + - component: {fileID: 1096132979} + - component: {fileID: 1096132978} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1096132977 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1096132976} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1220784191} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.23952085, y: 0.6254073} - m_AnchorMax: {x: 0.76100004, y: 0.95000005} - m_AnchoredPosition: {x: 0.1800232, y: 1.3099976} - m_SizeDelta: {x: -4.730011, y: -5.1900024} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1085988844 +--- !u!114 &1096132978 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1085988842} - m_Enabled: 0 + m_GameObject: {fileID: 1096132976} + m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0, g: 0, b: 0, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 80 - m_FontStyle: 3 - m_BestFit: 0 - m_MinSize: 4 - m_MaxSize: 80 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Game Over, aperte para sair. ---- !u!222 &1085988845 + m_text: Cavalo + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &1096132979 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1085988842} + m_GameObject: {fileID: 1096132976} m_CullTransparentMesh: 1 --- !u!1 &1206968598 GameObject: @@ -523,6 +1276,275 @@ MonoBehaviour: - {fileID: 21300000, guid: 2e95eda1ff934164db5526ecabd5da7a, type: 3} - {fileID: 21300000, guid: 044d6e38a893bff4c9444b5a4b0db091, type: 3} - {fileID: 21300000, guid: d0024b839053f92459d1bf3a6cbc2422, type: 3} +--- !u!1 &1220784190 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1220784191} + - component: {fileID: 1220784194} + - component: {fileID: 1220784193} + - component: {fileID: 1220784192} + m_Layer: 5 + m_Name: Knight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1220784191 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1220784190} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1096132977} + m_Father: {fileID: 493770860} + 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} + m_AnchoredPosition: {x: 5.23, y: -191.77} + m_SizeDelta: {x: 298.35, y: 60.31} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1220784192 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1220784190} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + 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_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, 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_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1220784193} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: -7192434741991543191, guid: 715b9167f3bcc58449a4c119ca437a90, type: 3} + m_TargetAssemblyTypeName: MovePlate, Scripts + m_MethodName: PromoteToKnight + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1220784193 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1220784190} + 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: 1, g: 1, b: 1, a: 1} + 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: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + 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!222 &1220784194 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1220784190} + m_CullTransparentMesh: 1 +--- !u!1 &1222195113 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1222195114} + - component: {fileID: 1222195116} + - component: {fileID: 1222195115} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1222195114 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1222195113} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 491666637} + 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: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1222195115 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1222195113} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Bispo + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &1222195116 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1222195113} + m_CullTransparentMesh: 1 --- !u!1 &1261937585 GameObject: m_ObjectHideFlags: 0 @@ -599,7 +1621,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 @@ -617,6 +1639,7 @@ RectTransform: m_Children: - {fileID: 584682954} - {fileID: 1085988843} + - {fileID: 493770860} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -736,6 +1759,276 @@ MonoBehaviour: - {fileID: 21300000, guid: 6eed6028af9d489498528a165c16d3da, type: 3} - {fileID: 21300000, guid: b73bbb6d77d918e42b8c2747cd5e0072, type: 3} - {fileID: 21300000, guid: 8dc6ecd7b73c30b42a92a1b3def9b513, type: 3} +--- !u!1 &1627351290 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1627351291} + - component: {fileID: 1627351293} + - component: {fileID: 1627351292} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1627351291 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1627351290} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 478892077} + 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: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1627351292 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1627351290} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Rainha + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &1627351293 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1627351290} + m_CullTransparentMesh: 1 +--- !u!1 &2014358420 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2014358421} + - component: {fileID: 2014358423} + - component: {fileID: 2014358422} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2014358421 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2014358420} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 606803062} + 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: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2014358422 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2014358420} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Torre + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &2014358423 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2014358420} + m_CullTransparentMesh: 1 --- !u!1 &2106842907 GameObject: m_ObjectHideFlags: 0 diff --git a/chess-game-project/Assets/Scripts/AI.cs b/chess-game-project/Assets/Scripts/AI.cs index 1b59d6e..6f3109f 100644 --- a/chess-game-project/Assets/Scripts/AI.cs +++ b/chess-game-project/Assets/Scripts/AI.cs @@ -1,7 +1,8 @@ using System; using System.Collections.Generic; -public class Move { +public class Move +{ public int x; public int y; public int destX; @@ -24,7 +25,8 @@ public Move(int _x, int _y, int _destX, int _destY, bool roque = false) this.roque = roque; attack = false; } - public Move(int _x, int _y, int _destX, int _destY, int _score){ + public Move(int _x, int _y, int _destX, int _destY, int _score) + { Board board = new Board(); // if (!board.VerifyInsideBoard(_destX, _destX) || !board.VerifyInsideBoard(_x, _y)) // { @@ -37,29 +39,35 @@ public Move(int _x, int _y, int _destX, int _destY, int _score){ score = _score; attack = true; } - static public Move Fake(){ - return new Move(0,0,0,0,-9999); + static public Move Fake() + { + return new Move(0, 0, 0, 0, -9999); } } -public class Piece { +public class Piece +{ public int enabled = 1; public int type; public int team; public int x; public int y; public bool move = false; - public Piece(int _type, int _team, int _x, int _y){ + public Piece(int _type, int _team, int _x, int _y) + { type = _type; team = _team; x = _x; y = _y; } - public int TypeToScore(){ - return this.type+1; - } - public Move[] Movement(Board board){ - switch(type){ + public int TypeToScore() + { + return this.type + 1; + } + public Move[] Movement(Board board) + { + switch (type) + { case 0: return this.pawn(board); // Peao case 1: return this.L(board); // Cavalo case 2: return this.cross(board); // Bispo @@ -68,8 +76,9 @@ public Move[] Movement(Board board){ } return this.adj(board); // Rei } - - public Move[] Queen(Board board){ + + public Move[] Queen(Board board) + { Move[] x = this.cross(board); Move[] y = this.Plus(board); Move[] z = new Move[x.Length + y.Length]; @@ -78,182 +87,238 @@ public Move[] Queen(Board board){ return z; } // 4 straight lines - public Move[] Plus(Board board){ - Piece piece = this; + public Move[] Plus(Board board) + { + Piece piece = this; List moves = new List(); int x = piece.x; int y = piece.y; - for(int i = x + 1; i < 8; i++){ + for (int i = x + 1; i < 8; i++) + { if (!board.VerifyInsideBoard(i, y)) continue; - if(board.GetPiece(i, y) == null){ - moves.Add(new Move(x,y, i,y)); - }else{ - if(board.GetPiece(i, y).team != piece.team){ - moves.Add(new Move(x,y, i,y, (board.GetPiece(i, y)).TypeToScore())); + if (board.GetPiece(i, y) == null) + { + moves.Add(new Move(x, y, i, y)); + } + else + { + if (board.GetPiece(i, y).team != piece.team) + { + moves.Add(new Move(x, y, i, y, (board.GetPiece(i, y)).TypeToScore())); } break; } } - - for(int i = x - 1; i >= 0; i--){ + + for (int i = x - 1; i >= 0; i--) + { if (!board.VerifyInsideBoard(i, y)) continue; - if(board.GetPiece(i, y) == null){ - moves.Add(new Move(x,y, i,y)); - }else{ - if(board.GetPiece(i, y).team != piece.team){ - moves.Add(new Move(x,y, i,y, (board.GetPiece(i, y)).TypeToScore())); + if (board.GetPiece(i, y) == null) + { + moves.Add(new Move(x, y, i, y)); + } + else + { + if (board.GetPiece(i, y).team != piece.team) + { + moves.Add(new Move(x, y, i, y, (board.GetPiece(i, y)).TypeToScore())); } break; } } - - for(int i = y + 1; i < 8; i++){ + + for (int i = y + 1; i < 8; i++) + { if (!board.VerifyInsideBoard(x, i)) continue; - if(board.GetPiece(x, i) == null){ - moves.Add(new Move(x,y, x,i)); - }else{ - if(board.GetPiece(x, i).team != piece.team){ - moves.Add(new Move(x,y, x,i, (board.GetPiece(x, i)).TypeToScore())); + if (board.GetPiece(x, i) == null) + { + moves.Add(new Move(x, y, x, i)); + } + else + { + if (board.GetPiece(x, i).team != piece.team) + { + moves.Add(new Move(x, y, x, i, (board.GetPiece(x, i)).TypeToScore())); } break; } } - - for(int i = y - 1; i >= 0; i--){ + + for (int i = y - 1; i >= 0; i--) + { if (!board.VerifyInsideBoard(x, i)) continue; - if(board.GetPiece(x, i) == null){ - moves.Add(new Move(x,y, x,i)); - }else{ - if(board.GetPiece(x, i).team != piece.team){ - moves.Add(new Move(x,y, x,i, (board.GetPiece(x, i)).TypeToScore())); + if (board.GetPiece(x, i) == null) + { + moves.Add(new Move(x, y, x, i)); + } + else + { + if (board.GetPiece(x, i).team != piece.team) + { + moves.Add(new Move(x, y, x, i, (board.GetPiece(x, i)).TypeToScore())); } break; } } - + return moves.ToArray(); } // 4 diagonals - public Move[] cross(Board board){ - Piece piece = this; + public Move[] cross(Board board) + { + Piece piece = this; List moves = new List(); int x = piece.x; int y = piece.y; - for(int i = 1; (i+x < 8) && (i+y < 8); i++){ + for (int i = 1; (i + x < 8) && (i + y < 8); i++) + { if (!board.VerifyInsideBoard(x + i, y + i)) continue; - if(board.GetPiece(x+i, y+i) == null){ - moves.Add(new Move(x,y, x+i, y+i)); - }else{ - if(board.GetPiece(x+i, y+i).team != piece.team){ - moves.Add(new Move(x,y, x+i,y+i, (board.GetPiece(x+i,y+i)).TypeToScore())); + if (board.GetPiece(x + i, y + i) == null) + { + moves.Add(new Move(x, y, x + i, y + i)); + } + else + { + if (board.GetPiece(x + i, y + i).team != piece.team) + { + moves.Add(new Move(x, y, x + i, y + i, (board.GetPiece(x + i, y + i)).TypeToScore())); } break; } } - - for(int i = -1; (i+x >= 0) && (i+y >= 0); i--){ + + for (int i = -1; (i + x >= 0) && (i + y >= 0); i--) + { if (!board.VerifyInsideBoard(x + i, y + i)) continue; - if(board.GetPiece(x+i, y+i) == null){ - moves.Add(new Move(x,y, x+i, y+i)); - }else{ - if(board.GetPiece(x+i, y+i).team != piece.team){ - moves.Add(new Move(x,y, x+i,y+i, (board.GetPiece(x+i,y+i)).TypeToScore())); + if (board.GetPiece(x + i, y + i) == null) + { + moves.Add(new Move(x, y, x + i, y + i)); + } + else + { + if (board.GetPiece(x + i, y + i).team != piece.team) + { + moves.Add(new Move(x, y, x + i, y + i, (board.GetPiece(x + i, y + i)).TypeToScore())); } break; } } - - for(int i = 1; (i+x < 8) && (i-y >= 0); i++){ + + for (int i = 1; (i + x < 8) && (i - y >= 0); i++) + { if (!board.VerifyInsideBoard(x + i, i - y)) continue; - if(board.GetPiece(x+i, i-y) == null){ - moves.Add(new Move(x,y, x+i, i-y)); - }else{ - if(board.GetPiece(x+i, i-y).team != piece.team){ - moves.Add(new Move(x,y, x+i,i-y, (board.GetPiece(x+i,i-y)).TypeToScore())); + if (board.GetPiece(x + i, i - y) == null) + { + moves.Add(new Move(x, y, x + i, i - y)); + } + else + { + if (board.GetPiece(x + i, i - y).team != piece.team) + { + moves.Add(new Move(x, y, x + i, i - y, (board.GetPiece(x + i, i - y)).TypeToScore())); } break; } } - - for(int i = 1; (i-x >= 0) && (i+y < 8); i++){ + + for (int i = 1; (i - x >= 0) && (i + y < 8); i++) + { if (!board.VerifyInsideBoard(i - x, y + i)) continue; - if(board.GetPiece(i-x, y+i) == null){ - moves.Add(new Move(x,y, i-x, y+i)); - }else{ - if(board.GetPiece(i-x, y+i).team != piece.team){ - moves.Add(new Move(x,y, i-x,y+i, (board.GetPiece(i-x,y+i)).TypeToScore())); + if (board.GetPiece(i - x, y + i) == null) + { + moves.Add(new Move(x, y, i - x, y + i)); + } + else + { + if (board.GetPiece(i - x, y + i).team != piece.team) + { + moves.Add(new Move(x, y, i - x, y + i, (board.GetPiece(i - x, y + i)).TypeToScore())); } break; } } - + return moves.ToArray(); } // Adjacent squares - public Move[] adj(Board board){ - Piece piece = this; + public Move[] adj(Board board) + { + Piece piece = this; Piece target; - List moves = new List(); - int x = piece.x; + List moves = new List(); + int x = piece.x; int y = piece.y; - for(int i = -1; i <= 1; i+=2){ + for (int i = -1; i <= 1; i += 2) + { if (!board.VerifyInsideBoard(piece.x + i, piece.y)) continue; - target = board.GetPiece(x+i, y); - if(target == null){ - moves.Add(new Move(x,y, x+i, y)); - }else if(target.team != piece.team){ - moves.Add(new Move(x,y, x+i,y, target.TypeToScore())); - } - } - for(int i = -1; i <= 1; i+=2){ + target = board.GetPiece(x + i, y); + if (target == null) + { + moves.Add(new Move(x, y, x + i, y)); + } + else if (target.team != piece.team) + { + moves.Add(new Move(x, y, x + i, y, target.TypeToScore())); + } + } + for (int i = -1; i <= 1; i += 2) + { if (!board.VerifyInsideBoard(piece.x, piece.y + i)) continue; - target = board.GetPiece(x, y+i); - if(target == null){ - moves.Add(new Move(x,y, x,y+i)); - }else if(target.team != piece.team){ - moves.Add(new Move(x,y, x,y+i, target.TypeToScore())); - } - } - - for(int i = -1; i <= 1; i+=2){ - for(int z = -1; z <= 1; z+=2){ + target = board.GetPiece(x, y + i); + if (target == null) + { + moves.Add(new Move(x, y, x, y + i)); + } + else if (target.team != piece.team) + { + moves.Add(new Move(x, y, x, y + i, target.TypeToScore())); + } + } + + for (int i = -1; i <= 1; i += 2) + { + for (int z = -1; z <= 1; z += 2) + { if (!board.VerifyInsideBoard(piece.x + i, piece.y + z)) continue; - target = board.GetPiece(x+i, y+z); - if(target == null){ - moves.Add(new Move(x,y, x+i, y+z)); - }else if(target.team != piece.team){ - moves.Add(new Move(x,y, x+i, y+z, target.TypeToScore())); - } - } - } + target = board.GetPiece(x + i, y + z); + if (target == null) + { + moves.Add(new Move(x, y, x + i, y + z)); + } + else if (target.team != piece.team) + { + moves.Add(new Move(x, y, x + i, y + z, target.TypeToScore())); + } + } + } if (!piece.move) { if (piece.team == 0) { - if (board.GetPiece(0,0) != null && !board.GetPiece(0, 0).move && VerifyRoque(board, 0)) + if (board.GetPiece(0, 0) != null && !board.GetPiece(0, 0).move && VerifyRoque(board, 0)) { - moves.Add(new Move(x,y, 0,0, roque: true)); - } + moves.Add(new Move(x, y, 0, 0, roque: true)); + } if (board.GetPiece(7, 0) != null && !board.GetPiece(7, 0).move && VerifyRoque(board, 7)) { - moves.Add(new Move(x,y, 0,0, roque: true)); + moves.Add(new Move(x, y, 0, 0, roque: true)); } } else { - if (board.GetPiece(0,7) != null && !board.GetPiece(0, 7).move && VerifyRoque(board, 0)) + if (board.GetPiece(0, 7) != null && !board.GetPiece(0, 7).move && VerifyRoque(board, 0)) { - moves.Add(new Move(x,y, 0,7, roque: true)); - } - if (board.GetPiece(7,7) != null && !board.GetPiece(7, 7).move && VerifyRoque(board, 7)) + moves.Add(new Move(x, y, 0, 7, roque: true)); + } + if (board.GetPiece(7, 7) != null && !board.GetPiece(7, 7).move && VerifyRoque(board, 7)) { - moves.Add(new Move(x,y, 7,7, roque: true)); - } + moves.Add(new Move(x, y, 7, 7, roque: true)); + } } } return moves.ToArray(); - } + } public bool VerifyRoque(Board board, int x) { @@ -272,18 +337,19 @@ public bool VerifyRoque(Board board, int x) return true; } } - + // Adjacent squares - public Move[] pawn(Board board){ - Piece piece = this; + public Move[] pawn(Board board) + { + Piece piece = this; Piece target; - List moves = new List(); - - int firstMove = 0; - int delta = 0; - if(piece.team == 0){delta = 1;if(piece.y == 1){firstMove = 1;}} - if(piece.team == 1){delta = -1;if(piece.y == 6){firstMove = 1;}} - if(board.VerifyInsideBoard(piece.x, piece.y + delta)) + List moves = new List(); + + int firstMove = 0; + int delta = 0; + if (piece.team == 0) { delta = 1; if (piece.y == 1) { firstMove = 1; } } + if (piece.team == 1) { delta = -1; if (piece.y == 6) { firstMove = 1; } } + if (board.VerifyInsideBoard(piece.x, piece.y + delta)) { if (board.GetPiece(piece.x, piece.y + delta) == null) { @@ -293,38 +359,46 @@ public Move[] pawn(Board board){ if (board.GetPiece(piece.x, piece.y + delta * 2) == null) { // Só vale pra casa inicial - moves.Add(new Move(piece.x, piece.y, piece.x, piece.y + delta*2)); + moves.Add(new Move(piece.x, piece.y, piece.x, piece.y + delta * 2)); } } } } - for(int ii = -1; ii <= 1; ii+=2) + for (int ii = -1; ii <= 1; ii += 2) { - if (!board.VerifyInsideBoard(piece.x + ii, piece.y + delta)) continue; + if (!board.VerifyInsideBoard(piece.x + ii, piece.y + delta)) continue; target = board.GetPiece(piece.x + ii, piece.y + delta); - if(target != null && target.team != this.team){ + if (target != null && target.team != this.team) + { moves.Add(new Move(piece.x, piece.y, piece.x + ii, piece.y + delta, target.TypeToScore())); } } return moves.ToArray(); - } - public Move[] L(Board board){ - Piece piece = this; + } + public Move[] L(Board board) + { + Piece piece = this; List moves = new List(); Piece target; int x = piece.x; int y = piece.y; - for(int i = -1; i <= 1; i+=2){ // Invert Y - for(int z = 0; z <= 1; z++){ // Change x and y sizes - for(int w = -1; w <= 1; w+=2){ // Invert x - x = (1+z)*w; - y = (2-z)*i; + for (int i = -1; i <= 1; i += 2) + { // Invert Y + for (int z = 0; z <= 1; z++) + { // Change x and y sizes + for (int w = -1; w <= 1; w += 2) + { // Invert x + x = (1 + z) * w; + y = (2 - z) * i; if (!board.VerifyInsideBoard(piece.x + x, piece.y + y)) continue; - target = board.GetPiece(piece.x + x,piece.y + y); - if(target == null){ - moves.Add(new Move(piece.x,piece.y, piece.x+x, piece.y+y)); - }else if(target.team != piece.team){ - moves.Add(new Move(piece.x,piece.y, piece.x+x, piece.y+y, target.TypeToScore())); + target = board.GetPiece(piece.x + x, piece.y + y); + if (target == null) + { + moves.Add(new Move(piece.x, piece.y, piece.x + x, piece.y + y)); + } + else if (target.team != piece.team) + { + moves.Add(new Move(piece.x, piece.y, piece.x + x, piece.y + y, target.TypeToScore())); } } } @@ -332,24 +406,33 @@ public Move[] L(Board board){ return moves.ToArray(); } } -public class Board { - public Piece[,] positions = new Piece[8,8]; +public class Board +{ + public Piece[,] positions = new Piece[8, 8]; public List wPieces = new(); public List bPieces = new(); - public void AddPiece(int type, int team, int x, int y){ + public void AddPiece(int type, int team, int x, int y) + { Piece p = new Piece(type, team, x, y); - positions[x, y] = p; - if(team == 0) { + positions[x, y] = p; + if (team == 0) + { wPieces.Add(p); - }else { + } + else + { bPieces.Add(p); } } - public void AddPiece(Piece p){ - positions[p.x, p.y] = p; - if(p.team == 0) { + public void AddPiece(Piece p) + { + positions[p.x, p.y] = p; + if (p.team == 0) + { wPieces.Add(p); - }else { + } + else + { bPieces.Add(p); } } @@ -366,28 +449,34 @@ public void RemovePiece(Piece p) bPieces.Remove(p); } } - - public Piece[] GetPieces(int turn) { + + public Piece[] GetPieces(int turn) + { List resp = new List(); - if(turn == 0){ + if (turn == 0) + { foreach (var p in wPieces) { - if(p != null && p.enabled == 1){resp.Add(p);} + if (p != null && p.enabled == 1) { resp.Add(p); } } - - }else{ + + } + else + { foreach (var p in bPieces) { - if(p != null && p.enabled == 1){resp.Add(p);} + if (p != null && p.enabled == 1) { resp.Add(p); } } } return resp.ToArray(); } - public Piece GetPiece(int x, int y){ - return this.positions[x,y]; + public Piece GetPiece(int x, int y) + { + return this.positions[x, y]; } - public void SetPiece(int x, int y, Piece p){ - this.positions[x,y] = p; + public void SetPiece(int x, int y, Piece p) + { + this.positions[x, y] = p; } public bool VerifyInsideBoard(int x, int y) @@ -396,7 +485,8 @@ public bool VerifyInsideBoard(int x, int y) return false; return true; } - public void _move(Move _move){ + public void _move(Move _move) + { if (_move.roque) RoqueMove(_move.x, _move.y, _move.destX, _move.destY); else @@ -432,17 +522,18 @@ private void RoqueRMove(int x, int y, int xd, int yd) } } - public void Move(int x, int y, int xd, int yd){ - positions[x,y].x = xd; - positions[x,y].y = yd; - positions[xd,yd] = this.positions[x,y]; - positions[xd,yd].move = true; - positions[x,y] = null; + public void Move(int x, int y, int xd, int yd) + { + positions[x, y].x = xd; + positions[x, y].y = yd; + positions[xd, yd] = this.positions[x, y]; + positions[xd, yd].move = true; + positions[x, y] = null; } public void RoqueMove(int x, int y, int xd, int yd) { - if(positions[x,y].x == 0) + if (positions[x, y].x == 0) { positions[x, y].x = 2; positions[2, y] = this.positions[x, y]; @@ -463,27 +554,34 @@ public void RoqueMove(int x, int y, int xd, int yd) } } -public class AI{ - public static Move BestChoice(Board board, int turn, int depth){ +public class AI +{ + public static Move BestChoice(Board board, int turn, int depth) + { return _bestChoice(board, turn, depth, turn, -1, 9999); } - private static Move _bestChoice(Board board, int turn, int depth, int maxmizeTurn, int alpha, int beta){ + private static Move _bestChoice(Board board, int turn, int depth, int maxmizeTurn, int alpha, int beta) + { Piece _p; Move bestMove = Move.Fake(); - foreach(var p in board.GetPieces(turn)){ - foreach(var m in p.Movement(board)){ + foreach (var p in board.GetPieces(turn)) + { + foreach (var m in p.Movement(board)) + { // Console.WriteLine("T"+turn +" - "+ m.x +" "+ m.y + " -> " + m.destX +" "+ m.destY +" $"+ m.score); - if(depth > 0){ + if (depth > 0) + { _p = board.GetPiece(m.destX, m.destY); - if(_p != null) board.RemovePiece(_p); + if (_p != null) board.RemovePiece(_p); board._move(m); // Possivelmente parte de um bug (1) - m.score += _bestChoice(board, (turn+1)%2, depth-1, maxmizeTurn, alpha, beta).score; // Recursive Score + m.score += _bestChoice(board, (turn + 1) % 2, depth - 1, maxmizeTurn, alpha, beta).score; // Recursive Score board._rMove(m); // Possivelmente parte de um bug (2) board.SetPiece(m.destX, m.destY, _p); - if(_p != null) board.AddPiece(_p); + if (_p != null) board.AddPiece(_p); } - if(m.score > bestMove.score){ // Max(this, last) + if (m.score > bestMove.score) + { // Max(this, last) bestMove = m; // if(turn == maxmizeTurn){ // if(m.score > alpha){ @@ -511,7 +609,7 @@ public static Move RandomChoice(Board board, int turn) List pieces = new List(); foreach (var piece in board.GetPieces(turn)) { - if(piece.Movement(board).Length > 0) + if (piece.Movement(board).Length > 0) pieces.Add(piece); } Random r = new Random(); @@ -522,5 +620,5 @@ public static Move RandomChoice(Board board, int turn) return movePiece[index]; } - + } \ No newline at end of file diff --git a/chess-game-project/Assets/Scripts/Chessman.cs b/chess-game-project/Assets/Scripts/Chessman.cs index 06776ef..5b0a846 100644 --- a/chess-game-project/Assets/Scripts/Chessman.cs +++ b/chess-game-project/Assets/Scripts/Chessman.cs @@ -8,6 +8,7 @@ public class Chessman : MonoBehaviour public GameObject controller; public GameObject movePlate; + // Posições private int xBoard = -1; private int yBoard = -1; @@ -130,15 +131,55 @@ public void SetYBoard(int y) { yBoard = y; } - + + public string GetPlayer() + { + return this.player; + } + public string GetName() { return this.name; } - - public string GetPlayer() + + public Sprite GetWhiteQueen() { - return this.player; + return whiteQueen[setID]; + } + + public Sprite GetWhiteTower() + { + return whiteTower[setID]; + } + + public Sprite GetWhiteBishop() + { + return whiteBishop[setID]; + } + + public Sprite GetWhiteKnight() + { + return whiteKnight[setID]; + } + + public Sprite GetBlackQueen() + { + return blackQueen[setID]; + } + + public Sprite GetBlackTower() + { + return blackTower[setID]; + } + + public Sprite GetBlackBishop() + { + return blackBishop[setID]; + } + + public Sprite GetBlackKnight() + { + return blackKnight[setID]; } public bool GetMove() @@ -276,7 +317,7 @@ public void LineMovePlate(int xIncrement, int yIncrement) } if(sc.PositionOnBoard(x,y) && sc.GetPosition(x,y).GetComponent().player != player){ - MovePlateAttackSpawn(x,y); + MovePlateSpawn(x,y, attack: true); } } @@ -284,6 +325,8 @@ public void LineMovePlate(int xIncrement, int yIncrement) public void PawnMovePlate(int x, int y) { Game sc = controller.GetComponent(); + bool promote = false; + if (sc.PositionOnBoard(x, y)) { // Se for a posição inicial do peão, spawnar dois movePlate @@ -292,9 +335,7 @@ public void PawnMovePlate(int x, int y) if (sc.GetPosition(x, y) == null) { MovePlateSpawn(x, y); - if ((sc.GetPosition(x, y + 1) == null)){ - MovePlateSpawn(x, y + 1); - } + MovePlateSpawn(x, y + 1); } } else if (sc.GetCurrentPlayer() == "black" && y == 5) @@ -302,27 +343,46 @@ public void PawnMovePlate(int x, int y) if (sc.GetPosition(x, y) == null) { MovePlateSpawn(x, y); - if ((sc.GetPosition(x, y - 1) == null)){ - MovePlateSpawn(x, y - 1); - } + MovePlateSpawn(x, y - 1); } } - else + else if (sc.GetCurrentPlayer() == "white") { if (sc.GetPosition(x, y) == null) { - MovePlateSpawn(x, y); + if (y == 7) + promote = true; + MovePlateSpawn(x, y, promote: promote); } } - + else if (sc.GetCurrentPlayer() == "black") + { + if (sc.GetPosition(x, y) == null) + { + if (y == 0) + promote = true; + MovePlateSpawn(x, y, promote: promote); + } + } + if (sc.PositionOnBoard(x + 1, y) && sc.GetPosition(x + 1, y) != null && sc.GetPosition(x + 1, y).GetComponent().player != player) { - MovePlateAttackSpawn(x + 1, y); + if (y == 7 && sc.GetCurrentPlayer() == "white") + promote = true; + else if (y == 0 && sc.GetCurrentPlayer() == "black") + promote = true; + + MovePlateSpawn(x + 1, y, attack: true, promote: promote); } if (sc.PositionOnBoard(x - 1, y) && sc.GetPosition(x - 1, y) != null && sc.GetPosition(x - 1, y).GetComponent().player != player) { - MovePlateAttackSpawn(x - 1, y); + if (y == 7 && sc.GetCurrentPlayer() == "white") + promote = true; + else if (y == 0 && sc.GetCurrentPlayer() == "black") + promote = true; + + MovePlateSpawn(x - 1, y, attack: true, promote: promote); } } } @@ -424,13 +484,14 @@ a MovePlate de ataque na posição. } else if (chessPiece.GetComponent().player != player) { - MovePlateAttackSpawn(x, y); + MovePlateSpawn(x, y, attack: true); } } } - // Desenha os moveplates de acordo com uma matrix 8x8 - public void MovePlateSpawn(int matrixX, int matrixY, bool roque = false, bool attack = false) + // Desenha os moveplates de acordo com uma matrix 8x8 caso seja uma ação de ataque xor promoção de peão + // passe os respectivos atributos como true + public void MovePlateSpawn(int matrixX, int matrixY, bool roque = false, bool attack = false, bool promote = false) { // Recupera o valor do tabuleiro para converter em xy coordenadas float x = matrixX; @@ -448,6 +509,7 @@ public void MovePlateSpawn(int matrixX, int matrixY, bool roque = false, bool at // Cria uma instância do moveplate e interage com essa instância. MovePlate mpScript = mp.GetComponent(); + mpScript.promote = promote; mpScript.attack = attack; mpScript.roque = roque; mpScript.SetReference(gameObject); @@ -477,7 +539,7 @@ public void MovePlateAttackSpawn(int matrixX, int matrixY) mpScript.SetReference(gameObject); mpScript.SetCoordinates(matrixX, matrixY); } - + public void MovePlateIaSpawn(int matrixX, int matrixY, GameObject gc, bool attack) { // Recupera o valor do tabuleiro para converter em xy coordenadas diff --git a/chess-game-project/Assets/Scripts/Game.cs b/chess-game-project/Assets/Scripts/Game.cs index d89d7b7..64bba19 100644 --- a/chess-game-project/Assets/Scripts/Game.cs +++ b/chess-game-project/Assets/Scripts/Game.cs @@ -6,7 +6,7 @@ public class Game : MonoBehaviour { public GameObject chesspiece; - private GameObject[,] positions = new GameObject[8,8]; + private GameObject[,] positions = new GameObject[8, 8]; private GameObject[] whitePlayer = new GameObject[16]; private GameObject[] blackPlayer = new GameObject[16]; private GameObject[,] destroyedPieces; @@ -20,18 +20,18 @@ public class Game : MonoBehaviour // Start is called before the first frame update public void Start() { - whitePlayer = new GameObject[] + whitePlayer = new GameObject[] { - Create("whitePawn", 0, 1), Create("whitePawn", 1, 1), Create("whitePawn", 2, 1), - Create("whitePawn", 3, 1), Create("whitePawn", 4, 1), Create("whitePawn", 5, 1), + Create("whitePawn", 0, 1), Create("whitePawn", 1, 1), Create("whitePawn", 2, 1), + Create("whitePawn", 3, 1), Create("whitePawn", 4, 1), Create("whitePawn", 5, 1), Create("whitePawn", 6, 1), Create("whitePawn", 7, 1), - Create("whiteTower", 0, 0), Create("whiteKnight", 1, 0), Create("whiteBishop", 2, 0), - Create("whiteQueen", 3, 0), Create("whiteKing", 4, 0), + Create("whiteTower", 0, 0), Create("whiteKnight", 1, 0), Create("whiteBishop", 2, 0), + Create("whiteQueen", 3, 0), Create("whiteKing", 4, 0), Create("whiteBishop", 5, 0), Create("whiteKnight", 6, 0), Create("whiteTower", 7, 0), }; blackPlayer = new GameObject[] { - + Create("blackPawn", 0, 6), Create("blackPawn", 1, 6), Create("blackPawn", 2, 6), Create("blackPawn", 3, 6), Create("blackPawn", 4, 6), Create("blackPawn", 5, 6), Create("blackPawn", 6, 6), Create("blackPawn", 7, 6), @@ -39,23 +39,23 @@ public void Start() Create("blackQueen", 3, 7), Create("blackKing", 4, 7), Create("blackBishop", 5, 7), Create("blackKnight", 6, 7), Create("blackTower", 7, 7) }; - - this.destroyedPieces = new GameObject[4,8]; + + this.destroyedPieces = new GameObject[4, 8]; // Coloca as peças no tabuleiro - for (int i = 0; i < whitePlayer.Length; i++) + for (int i = 0; i < whitePlayer.Length; i++) { SetPosition(whitePlayer[i]); } - for (int i = 0; i < blackPlayer.Length; i++) + for (int i = 0; i < blackPlayer.Length; i++) { SetPosition(blackPlayer[i]); } } // Função responsável por criar as peças no tabuleiro. - public GameObject Create(string name, int x, int y) + public GameObject Create(string name, int x, int y) { GameObject obj = Instantiate(chesspiece, new Vector3(0, 0, -1), Quaternion.identity); Chessman chessman = obj.GetComponent(); @@ -68,7 +68,7 @@ public GameObject Create(string name, int x, int y) } // Funções de Set e Get da posição de um GameObject. - public void SetPosition(GameObject obj) + public void SetPosition(GameObject obj) { Chessman chessman = obj.GetComponent(); @@ -110,7 +110,7 @@ public GameObject[] GetWhitePlayer() { return whitePlayer; } - + public GameObject[] GetBlackPlayer() { return blackPlayer; @@ -122,38 +122,38 @@ public GameObject GetPosition(int x, int y) } // Função de define que uma posição (x, y) fique vazia. - public void SetPositionEmpty(int x, int y) + public void SetPositionEmpty(int x, int y) { positions[x, y] = null; } - + public void SerPositionSpriteEmpty(int x, int y) { - positions[x, y].GetComponent().sprite = null; + positions[x, y].GetComponent().sprite = null; } // Função verifica se dado um valor (x, y), esse par está dentro do tabuleiro 8x8. - public bool PositionOnBoard(int x, int y) + public bool PositionOnBoard(int x, int y) { if (x < 0 || y < 0 || x >= positions.GetLength(0) || y >= positions.GetLength(1)) return false; return true; } - public string GetCurrentPlayer() + public string GetCurrentPlayer() { return currentPlayer; } - - public bool IsBlackIa() - { - return blackIa; - } - - public bool IsWhiteIa() - { - return whiteIa; - } + + public bool IsBlackIa() + { + return blackIa; + } + + public bool IsWhiteIa() + { + return whiteIa; + } public bool IsGameOver() { @@ -182,12 +182,12 @@ public void Update() SceneManager.LoadScene("Game"); } } - + public void AppendDestroyedPieces(GameObject cp) { if (cp.GetComponent().GetPlayer() == "white") { - for (int i = 1; i >= 0 ; i--) + for (int i = 1; i >= 0; i--) { for (int j = 0; j < 8; j++) { @@ -211,10 +211,10 @@ public void AppendDestroyedPieces(GameObject cp) return; } } - } + } } } - + public (int i, int j) SearchDestroyedPieces(GameObject cp) { for (int i = 0; i < 4; i++) @@ -238,8 +238,8 @@ public void Winner(string playerWinner) { return; } - + GameObject.FindGameObjectWithTag("EndText").GetComponent().enabled = true; GameObject.FindGameObjectWithTag("EndText").GetComponent().text = "O " + playerWinner + " venceu! Pressione o mouse para reiniciar"; } -} +} \ No newline at end of file diff --git a/chess-game-project/Assets/Scripts/MovePlate.cs b/chess-game-project/Assets/Scripts/MovePlate.cs index 4b27445..b6009c8 100644 --- a/chess-game-project/Assets/Scripts/MovePlate.cs +++ b/chess-game-project/Assets/Scripts/MovePlate.cs @@ -1,4 +1,8 @@ +using System; +using System.Collections; +using System.Collections.Generic; using UnityEngine; +using UnityEditor; public class MovePlate : MonoBehaviour { @@ -6,12 +10,18 @@ public class MovePlate : MonoBehaviour GameObject reference = null; + //Posições do tabuleiro int matrixX; int matrixY; // false: movimento, true: ataque public bool attack = false; + public bool promote = false; + + // Escolha da promoção + public string pecaPromo = "Tower"; + public bool roque = false; // Chamada quando o moveplate é criado @@ -21,6 +31,18 @@ public void Start() { // A cor do sprite muda para vermelho gameObject.GetComponent().color = new Color(1.0f, 0.0f, 0.0f, 1.0f); + + if (promote) + { + // a cor da sprite muda para roxo + gameObject.GetComponent().color = new Color(0.6f, 0.2f, 0.6f, 1.0f); + } + } + + if (promote) + { + // a cor da sprite muda para roxo + gameObject.GetComponent().color = new Color(0.6f, 0.2f, 0.6f, 1.0f); } if (roque) @@ -29,6 +51,28 @@ public void Start() } } + //Funções que mudam o nome da escolha de peça. Atrelados aos Butões do Panel + public void PromoteToQueen() + { + pecaPromo = "Queen"; + } + + public void PromoteToTower() + { + pecaPromo = "Tower"; + } + + public void PromoteToBishop() + { + pecaPromo = "Bishop"; + } + + public void PromoteToKnight() + { + pecaPromo = "Knight"; + } + + /* Função do Unity que é chamada quando o usuário clica e solta o botão do mouse. Nesse caso, essa OnMouseUp é responsável pela troca de um moveplate com a peça @@ -99,6 +143,58 @@ public void Movement() controller.GetComponent().SetPosition(reference); + //Função de promoção, muda a peça para a escolhida + if (promote) + { + + GameObject cp = controller.GetComponent().GetPosition(matrixX, matrixY); + if (matrixY == 7) + { + if (pecaPromo == "Tower") + { + cp.name = "whiteTower"; + cp.GetComponent().sprite = reference.GetComponent().GetWhiteTower(); + } + if (pecaPromo == "Queen") + { + cp.name = "whiteQueen"; + cp.GetComponent().sprite = reference.GetComponent().GetWhiteQueen(); + } + if (pecaPromo == "Bishop") + { + cp.name = "whiteBishop"; + cp.GetComponent().sprite = reference.GetComponent().GetWhiteBishop(); + } + if (pecaPromo == "Knight") + { + cp.name = "whiteKnight"; + cp.GetComponent().sprite = reference.GetComponent().GetWhiteKnight(); + } + } + else + { + if (pecaPromo == "Tower") + { + cp.name = "blackTower"; + cp.GetComponent().sprite = reference.GetComponent().GetBlackTower(); + } + if (pecaPromo == "Queen") + { + cp.name = "blackQueen"; + cp.GetComponent().sprite = reference.GetComponent().GetBlackQueen(); + } + if (pecaPromo == "Bishop") + { + cp.name = "blackBishop"; + cp.GetComponent().sprite = reference.GetComponent().GetBlackBishop(); + } + if (pecaPromo == "Knight") + { + cp.name = "blackKnight"; + cp.GetComponent().sprite = reference.GetComponent().GetBlackKnight(); + } + } + } //Alterna o jogador atual controller.GetComponent().NextTurn(); diff --git a/chess-game-project/Assets/Scripts/Tests/PlayMode/MovementTest.cs b/chess-game-project/Assets/Scripts/Tests/PlayMode/MovementTest.cs index fe46148..dc73b0a 100644 --- a/chess-game-project/Assets/Scripts/Tests/PlayMode/MovementTest.cs +++ b/chess-game-project/Assets/Scripts/Tests/PlayMode/MovementTest.cs @@ -373,74 +373,4 @@ public void Move_QueenKingToSelectedPositionAxis() Assert.AreEqual(chessman.GetYBoard(), 2); } - [Test] - public void Checkmate_Test() - { - //Peça branca e Rei Preto - Game game = GameObject.FindGameObjectWithTag("GameController").GetComponent(); - GameObject whiteChessPieceInstance = game.Create("whiteQueen", 3, 1); - GameObject blackKingChessPieceInstance = game.Create("blackKing", 4, 2); - game.SetPosition(whiteChessPieceInstance); - game.SetPosition(blackKingChessPieceInstance); - - Chessman chessman = whiteChessPieceInstance.GetComponent(); - - GameObject movePlatePrefab = new GameObject(); - movePlatePrefab.AddComponent(); - movePlatePrefab.AddComponent(); - chessman.movePlate = movePlatePrefab; - - // Cima - float x = 4 * 1.15f - 4f; - float y = 2 * 1.15f - 3.6f; - - GameObject movePlateInstance = Chessman.Instantiate(chessman.movePlate, new Vector3(x, y, -3.0f), Quaternion.identity); - MovePlate movePlate = movePlateInstance.GetComponent(); - movePlate.SetReference(whiteChessPieceInstance); - movePlate.SetCoordinates(4, 2); - movePlate.attack = true; - - movePlate.OnMouseUp(); - - Assert.IsNull(game.GetPosition(3, 1)); - Assert.AreSame(game.GetPosition(4, 2), whiteChessPieceInstance); - } - - [Test] - public void RedMoveplate_Test() - { - //Peça branca e Rei Preto - Game game = GameObject.FindGameObjectWithTag("GameController").GetComponent(); - GameObject whiteChessPieceInstance = game.Create("whiteQueen", 3, 1); - GameObject blackKingChessPieceInstance = game.Create("blackKing", 4, 2); - game.SetPosition(whiteChessPieceInstance); - game.SetPosition(blackKingChessPieceInstance); - - Chessman chessman = whiteChessPieceInstance.GetComponent(); - - GameObject movePlatePrefab = new GameObject(); - movePlatePrefab.AddComponent(); - movePlatePrefab.AddComponent(); - chessman.movePlate = movePlatePrefab; - - // Cima - float x = 4 * 1.15f - 4f; - float y = 2 * 1.15f - 3.6f; - - GameObject movePlateInstance = Chessman.Instantiate(chessman.movePlate, new Vector3(x, y, -3.0f), Quaternion.identity); - MovePlate movePlate = movePlateInstance.GetComponent(); - movePlate.SetReference(whiteChessPieceInstance); - movePlate.SetCoordinates(4, 2); - movePlate.attack = true; - - movePlate.Start(); - - var color = movePlate.GetComponent().color; - var black = new Color(0.0f, 0.0f, 0.0f, 1.0f); - var red = new Color(1.0f, 0.0f, 0.0f, 1.0f); - - Assert.AreEqual(color, red); - Assert.AreNotEqual(color, black); - } - } diff --git a/chess-game-project/ProjectSettings/TagManager.asset b/chess-game-project/ProjectSettings/TagManager.asset index 23b135a..4939145 100644 --- a/chess-game-project/ProjectSettings/TagManager.asset +++ b/chess-game-project/ProjectSettings/TagManager.asset @@ -7,6 +7,7 @@ TagManager: - MovePlate - EndText - WinnerText + - Panel layers: - Default - TransparentFX diff --git a/chess-game-project/UserSettings/Layouts/default-2021.dwlt b/chess-game-project/UserSettings/Layouts/default-2021.dwlt index abe66c1..96e9617 100644 --- a/chess-game-project/UserSettings/Layouts/default-2021.dwlt +++ b/chess-game-project/UserSettings/Layouts/default-2021.dwlt @@ -14,91 +14,17 @@ MonoBehaviour: m_EditorClassIdentifier: m_PixelRect: serializedVersion: 2 - x: 1920 - y: 8 + x: 0 + y: 43 width: 1920 - height: 1032 - m_ShowMode: 0 - m_Title: Profiler - m_RootView: {fileID: 4} - m_MinSize: {x: 880, y: 237} - m_MaxSize: {x: 4000, y: 4021} - m_Maximized: 0 ---- !u!114 &2 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_PixelRect: - serializedVersion: 2 - x: 8 - y: 53 - width: 1902 - height: 971 + height: 1037 m_ShowMode: 4 m_Title: Game - m_RootView: {fileID: 11} + m_RootView: {fileID: 8} m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} - m_Maximized: 0 ---- !u!114 &3 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: ProfilerWindow - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 0 - y: 0 - width: 1920 - height: 1032 - m_MinSize: {x: 880, y: 216} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 17} - m_Panes: - - {fileID: 17} - m_Selected: 0 - m_LastSelected: 0 ---- !u!114 &4 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: - - {fileID: 3} - m_Position: - serializedVersion: 2 - x: 0 - y: 0 - width: 1920 - height: 1032 - m_MinSize: {x: 880, y: 237} - m_MaxSize: {x: 4000, y: 4021} - vertical: 0 - controlID: 7081 ---- !u!114 &5 + m_Maximized: 1 +--- !u!114 &2 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -115,16 +41,16 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 450 - height: 736 + width: 238 + height: 789 m_MinSize: {x: 101, y: 121} m_MaxSize: {x: 4001, y: 4021} - m_ActualView: {fileID: 18} + m_ActualView: {fileID: 14} m_Panes: - - {fileID: 18} + - {fileID: 14} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &6 +--- !u!114 &3 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -137,19 +63,19 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: + - {fileID: 2} - {fileID: 5} - - {fileID: 8} m_Position: serializedVersion: 2 - x: 1452 + x: 1682 y: 0 - width: 450 - height: 921 + width: 238 + height: 987 m_MinSize: {x: 100, y: 200} m_MaxSize: {x: 8096, y: 16192} vertical: 1 - controlID: 52 ---- !u!114 &7 + controlID: 57 +--- !u!114 &4 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -162,19 +88,19 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 14} - - {fileID: 6} + - {fileID: 11} + - {fileID: 3} m_Position: serializedVersion: 2 x: 0 y: 30 - width: 1902 - height: 921 + width: 1920 + height: 987 m_MinSize: {x: 300, y: 200} m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: 90 ---- !u!114 &8 + controlID: 56 +--- !u!114 &5 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -190,17 +116,17 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 736 - width: 450 - height: 185 + y: 789 + width: 238 + height: 198 m_MinSize: {x: 276, y: 71} m_MaxSize: {x: 4001, y: 4021} - m_ActualView: {fileID: 20} + m_ActualView: {fileID: 16} m_Panes: - - {fileID: 20} + - {fileID: 16} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &9 +--- !u!114 &6 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -217,16 +143,16 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 359 - height: 545 + width: 412 + height: 447 m_MinSize: {x: 201, y: 221} m_MaxSize: {x: 4001, y: 4021} - m_ActualView: {fileID: 21} + m_ActualView: {fileID: 17} m_Panes: - - {fileID: 21} + - {fileID: 17} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &10 +--- !u!114 &7 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -242,18 +168,18 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 545 - width: 1452 - height: 376 - m_MinSize: {x: 100, y: 100} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 24} + y: 447 + width: 1682 + height: 540 + m_MinSize: {x: 101, y: 121} + m_MaxSize: {x: 4001, y: 4021} + m_ActualView: {fileID: 20} m_Panes: - - {fileID: 19} - - {fileID: 24} + - {fileID: 15} + - {fileID: 20} m_Selected: 1 m_LastSelected: 0 ---- !u!114 &11 +--- !u!114 &8 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -266,22 +192,22 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 12} - - {fileID: 7} - - {fileID: 13} + - {fileID: 9} + - {fileID: 4} + - {fileID: 10} m_Position: serializedVersion: 2 x: 0 y: 0 - width: 1902 - height: 971 + width: 1920 + height: 1037 m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} m_UseTopView: 1 m_TopViewHeight: 30 m_UseBottomView: 1 m_BottomViewHeight: 20 ---- !u!114 &12 +--- !u!114 &9 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -298,12 +224,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1902 + width: 1920 height: 30 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} m_LastLoadedLayoutName: ---- !u!114 &13 +--- !u!114 &10 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -319,12 +245,12 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 951 - width: 1902 + y: 1017 + width: 1920 height: 20 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} ---- !u!114 &14 +--- !u!114 &11 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -337,19 +263,19 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 15} - - {fileID: 10} + - {fileID: 12} + - {fileID: 7} m_Position: serializedVersion: 2 x: 0 y: 0 - width: 1452 - height: 921 + width: 1682 + height: 987 m_MinSize: {x: 200, y: 200} m_MaxSize: {x: 16192, y: 16192} vertical: 1 - controlID: 91 ---- !u!114 &15 + controlID: 159 +--- !u!114 &12 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -362,19 +288,19 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 9} - - {fileID: 16} + - {fileID: 6} + - {fileID: 13} m_Position: serializedVersion: 2 x: 0 y: 0 - width: 1452 - height: 545 + width: 1682 + height: 447 m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 92 ---- !u!114 &16 + controlID: 160 +--- !u!114 &13 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -389,715 +315,19 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 359 + x: 412 y: 0 - width: 1093 - height: 545 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 23} + width: 1270 + height: 447 + m_MinSize: {x: 202, y: 221} + m_MaxSize: {x: 4002, y: 4021} + m_ActualView: {fileID: 19} m_Panes: - - {fileID: 22} - - {fileID: 23} + - {fileID: 18} + - {fileID: 19} m_Selected: 1 m_LastSelected: 0 ---- !u!114 &17 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 12070, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_MinSize: {x: 880, y: 216} - m_MaxSize: {x: 4000, y: 4000} - m_TitleContent: - m_Text: Profiler - m_Image: {fileID: -1089619856830078684, guid: 0000000000000000d000000000000000, type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 1920 - y: 8 - width: 1920 - height: 1011 - m_ViewDataDictionary: {fileID: 0} - m_OverlayCanvas: - m_LastAppliedPresetName: Default - m_SaveData: [] - m_OverlaysVisible: 1 - m_Recording: 0 - m_ActiveNativePlatformSupportModuleName: - m_AllModules: - - rid: 6309017941590409233 - - rid: 6309017941590409234 - - rid: 6309017941590409235 - - rid: 6309017941590409236 - - rid: 6309017941590409237 - - rid: 6309017941590409238 - - rid: 6309017941590409239 - - rid: 6309017941590409240 - - rid: 6309017941590409241 - - rid: 6309017941590409242 - - rid: 6309017941590409243 - - rid: 6309017941590409244 - - rid: 6309017941590409245 - - rid: 6309017941590409246 - - rid: 6309017941590409247 - - rid: 6309017941590409248 - m_CallstackRecordMode: 1 - m_ClearOnPlay: 0 - references: - version: 2 - RefIds: - - rid: 6309017941590409233 - type: {class: CPUProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.CPUProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - m_ViewType: 0 - updateViewLive: 0 - m_CurrentFrameIndex: 299 - m_HierarchyOverruledThreadFromSelection: 0 - m_ProfilerViewFilteringOptions: 1 - m_FrameDataHierarchyView: - m_Serialized: 1 - m_TreeViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_MultiColumnHeaderState: - m_Columns: - - width: 1402 - sortedAscending: 1 - headerContent: - m_Text: Overview - m_Image: {fileID: 0} - m_Tooltip: - contextMenuText: - headerTextAlignment: 0 - sortingArrowAlignment: 2 - minWidth: 200 - maxWidth: 1000000 - autoResize: 1 - allowToggleVisibility: 0 - canSort: 1 - userData: 0 - - width: 80 - sortedAscending: 0 - headerContent: - m_Text: Total - m_Image: {fileID: 0} - m_Tooltip: - contextMenuText: - headerTextAlignment: 0 - sortingArrowAlignment: 2 - minWidth: 50 - maxWidth: 1000000 - autoResize: 0 - allowToggleVisibility: 1 - canSort: 1 - userData: 0 - - width: 80 - sortedAscending: 0 - headerContent: - m_Text: Self - m_Image: {fileID: 0} - m_Tooltip: - contextMenuText: - headerTextAlignment: 0 - sortingArrowAlignment: 2 - minWidth: 50 - maxWidth: 1000000 - autoResize: 0 - allowToggleVisibility: 1 - canSort: 1 - userData: 0 - - width: 80 - sortedAscending: 0 - headerContent: - m_Text: Calls - m_Image: {fileID: 0} - m_Tooltip: - contextMenuText: - headerTextAlignment: 0 - sortingArrowAlignment: 2 - minWidth: 50 - maxWidth: 1000000 - autoResize: 0 - allowToggleVisibility: 1 - canSort: 1 - userData: 0 - - width: 80 - sortedAscending: 0 - headerContent: - m_Text: GC Alloc - m_Image: {fileID: 0} - m_Tooltip: - contextMenuText: - headerTextAlignment: 0 - sortingArrowAlignment: 2 - minWidth: 50 - maxWidth: 1000000 - autoResize: 0 - allowToggleVisibility: 1 - canSort: 1 - userData: 0 - - width: 80 - sortedAscending: 0 - headerContent: - m_Text: Time ms - m_Image: {fileID: 0} - m_Tooltip: - contextMenuText: - headerTextAlignment: 0 - sortingArrowAlignment: 2 - minWidth: 50 - maxWidth: 1000000 - autoResize: 0 - allowToggleVisibility: 1 - canSort: 1 - userData: 0 - - width: 80 - sortedAscending: 0 - headerContent: - m_Text: Self ms - m_Image: {fileID: 0} - m_Tooltip: - contextMenuText: - headerTextAlignment: 0 - sortingArrowAlignment: 2 - minWidth: 50 - maxWidth: 1000000 - autoResize: 0 - allowToggleVisibility: 1 - canSort: 1 - userData: 0 - - width: 25 - sortedAscending: 0 - headerContent: - m_Text: - m_Image: {fileID: -5161429177145976760, guid: 0000000000000000d000000000000000, type: 0} - m_Tooltip: Warnings - contextMenuText: - headerTextAlignment: 0 - sortingArrowAlignment: 2 - minWidth: 25 - maxWidth: 25 - autoResize: 0 - allowToggleVisibility: 1 - canSort: 1 - userData: 0 - m_VisibleColumns: 0000000001000000020000000300000004000000050000000600000007000000 - m_SortedColumns: 05000000 - m_ThreadIndexInThreadNames: 0 - m_DetailedViewType: 0 - m_DetailedViewSpliterState: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: -1 - realSizes: - - 0 - - 0 - relativeSizes: - - 0.7 - - 0.3 - minSizes: - - 450 - - 50 - maxSizes: - - 0 - - 0 - lastTotalSize: 0 - splitSize: 6 - xOffset: 0 - m_Version: 1 - oldRealSizes: - oldMinSizes: - oldMaxSizes: - oldSplitSize: 0 - m_DetailedObjectsView: - m_SelectedID: -1 - m_TreeViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_MultiColumnHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_VertSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: 0 - realSizes: [] - relativeSizes: [] - minSizes: [] - maxSizes: [] - lastTotalSize: 0 - splitSize: 0 - xOffset: 0 - m_Version: 1 - oldRealSizes: - oldMinSizes: - oldMaxSizes: - oldSplitSize: 0 - m_DetailedCallsView: - m_SelectedID: -1 - m_VertSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: 0 - realSizes: [] - relativeSizes: [] - minSizes: [] - maxSizes: [] - lastTotalSize: 0 - splitSize: 0 - xOffset: 0 - m_Version: 1 - oldRealSizes: - oldMinSizes: - oldMaxSizes: - oldSplitSize: 0 - m_CalleesTreeView: - m_ViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_ViewHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_CallersTreeView: - m_ViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_ViewHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_FullThreadName: Main Thread - m_ThreadName: Main Thread - k__BackingField: 20832 - k__BackingField: 0 - m_GroupName: - - rid: 6309017941590409234 - type: {class: GPUProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.GPUProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - m_ViewType: 0 - updateViewLive: 0 - m_CurrentFrameIndex: -1 - m_HierarchyOverruledThreadFromSelection: 0 - m_ProfilerViewFilteringOptions: 1 - m_FrameDataHierarchyView: - m_Serialized: 0 - m_TreeViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_MultiColumnHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_ThreadIndexInThreadNames: 0 - m_DetailedViewType: 0 - m_DetailedViewSpliterState: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: 0 - realSizes: [] - relativeSizes: [] - minSizes: [] - maxSizes: [] - lastTotalSize: 0 - splitSize: 0 - xOffset: 0 - m_Version: 1 - oldRealSizes: - oldMinSizes: - oldMaxSizes: - oldSplitSize: 0 - m_DetailedObjectsView: - m_SelectedID: 0 - m_TreeViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_MultiColumnHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_VertSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: 0 - realSizes: [] - relativeSizes: [] - minSizes: [] - maxSizes: [] - lastTotalSize: 0 - splitSize: 0 - xOffset: 0 - m_Version: 1 - oldRealSizes: - oldMinSizes: - oldMaxSizes: - oldSplitSize: 0 - m_DetailedCallsView: - m_SelectedID: 0 - m_VertSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: 0 - realSizes: [] - relativeSizes: [] - minSizes: [] - maxSizes: [] - lastTotalSize: 0 - splitSize: 0 - xOffset: 0 - m_Version: 1 - oldRealSizes: - oldMinSizes: - oldMaxSizes: - oldSplitSize: 0 - m_CalleesTreeView: - m_ViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_ViewHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_CallersTreeView: - m_ViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_ViewHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_FullThreadName: Main Thread - m_ThreadName: Main Thread - k__BackingField: 0 - k__BackingField: -1 - m_GroupName: - - rid: 6309017941590409235 - type: {class: RenderingProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.RenderingProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409236 - type: {class: MemoryProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.MemoryProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - m_ViewSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: -1 - realSizes: - - 0 - - 0 - relativeSizes: - - 0.7 - - 0.3 - minSizes: - - 450 - - 50 - maxSizes: - - 0 - - 0 - lastTotalSize: 0 - splitSize: 6 - xOffset: 0 - m_Version: 1 - oldRealSizes: - oldMinSizes: - oldMaxSizes: - oldSplitSize: 0 - - rid: 6309017941590409237 - type: {class: AudioProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.AudioProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - m_ShowInactiveDSPChains: 0 - m_HighlightAudibleDSPChains: 1 - m_DSPGraphZoomFactor: 1 - - rid: 6309017941590409238 - type: {class: VideoProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.VideoProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409239 - type: {class: PhysicsProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.PhysicsProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409240 - type: {class: Physics2DProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.Physics2DProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409241 - type: {class: NetworkingMessagesProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.NetworkingMessagesProfilerModule, - UnityEditor.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409242 - type: {class: NetworkingOperationsProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.NetworkingOperationsProfilerModule, - UnityEditor.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - m_NetworkSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: -1 - realSizes: - - 0 - - 0 - relativeSizes: - - 0.2 - - 0.8 - minSizes: - - 100 - - 100 - maxSizes: - - 0 - - 0 - lastTotalSize: 0 - splitSize: 6 - xOffset: 0 - m_Version: 1 - oldRealSizes: - oldMinSizes: - oldMaxSizes: - oldSplitSize: 0 - msgNames: - - UserMessage - - ObjectDestroy - - ClientRpc - - ObjectSpawn - - Owner - - Command - - LocalPlayerTransform - - SyncEvent - - SyncVars - - SyncList - - ObjectSpawnScene - - NetworkInfo - - SpawnFinished - - ObjectHide - - CRC - - ClientAuthority - - rid: 6309017941590409243 - type: {class: UIProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.UIProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409244 - type: {class: UIDetailsProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.UIDetailsProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409245 - type: {class: GlobalIlluminationProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.GlobalIlluminationProfilerModule, - UnityEditor.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409246 - type: {class: VirtualTexturingProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.VirtualTexturingProfilerModule, - UnityEditor.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - m_VTProfilerView: - rid: 6309017941590409249 - - rid: 6309017941590409247 - type: {class: FileIOProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.FileIOProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409248 - type: {class: AssetLoadingProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.AssetLoadingProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409249 - type: {class: VirtualTexturingProfilerView, ns: UnityEditor, asm: UnityEditor.CoreModule} - data: - m_SortAscending: 0 - m_SortedColumn: -1 ---- !u!114 &18 +--- !u!114 &14 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -1117,22 +347,22 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1460 - y: 83 - width: 449 - height: 715 + x: 1682 + y: 73 + width: 237 + height: 768 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default m_SaveData: [] m_OverlaysVisible: 1 m_Spl: - ID: 141 + ID: 182 splitterInitialOffset: 0 currentActiveSplitter: -1 realSizes: - - 484 - - 161 + - 523 + - 175 relativeSizes: - 0.75 - 0.25 @@ -1142,7 +372,7 @@ MonoBehaviour: maxSizes: - 0 - 0 - lastTotalSize: 645 + lastTotalSize: 698 splitSize: 6 xOffset: 0 m_Version: 1 @@ -1152,14 +382,14 @@ MonoBehaviour: oldSplitSize: 0 m_TestTypeToolbarIndex: 0 m_PlayModeTestListGUI: - m_Window: {fileID: 18} + m_Window: {fileID: 14} m_NewResultList: - id: 1005 uniqueId: '[chess-game-project][suite]' name: chess-game-project fullName: chess-game-project resultStatus: 1 - duration: 1.398021 + duration: 2.6993935 messages: output: stacktrace: @@ -1170,12 +400,12 @@ MonoBehaviour: categories: [] parentId: parentUniqueId: - - id: 1026 - uniqueId: '[Tests][D:/Unity/Projects/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' + - id: 1039 + uniqueId: '[Tests][C:/Users/johan/Documents/GitHub/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' name: Tests.dll - fullName: D:/Unity/Projects/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll + fullName: C:/Users/johan/Documents/GitHub/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll resultStatus: 1 - duration: 1.222874 + duration: 2.361438 messages: output: stacktrace: @@ -1184,14 +414,14 @@ MonoBehaviour: description: isSuite: 1 categories: [] - parentId: 1005 + parentId: 1000 parentUniqueId: '[chess-game-project][suite]' - id: 1001 uniqueId: Tests.dll/[Tests][ChessmanTests][suite] name: ChessmanTests fullName: ChessmanTests resultStatus: 1 - duration: 0.0491955 + duration: 0.073714 messages: output: stacktrace: @@ -1200,14 +430,14 @@ MonoBehaviour: description: isSuite: 1 categories: [] - parentId: 1037 - parentUniqueId: '[Tests][D:/Unity/Projects/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' + parentId: 1039 + parentUniqueId: '[Tests][C:/Users/johan/Documents/GitHub/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' - id: 1016 uniqueId: Tests.dll/ChessmanTests/[Tests][ChessmanTests.ShouldCallOnMouseUp] name: ShouldCallOnMouseUp fullName: ChessmanTests.ShouldCallOnMouseUp resultStatus: 1 - duration: 0.0010314 + duration: 0.0016468 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1229,7 +459,7 @@ MonoBehaviour: name: ShouldInitializeAttackMovePlate_King_Side fullName: ChessmanTests.ShouldInitializeAttackMovePlate_King_Side resultStatus: 1 - duration: 0.001036 + duration: 0.0017218 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1251,7 +481,7 @@ MonoBehaviour: name: ShouldInitializeAttackMovePlate_Left_Pawn fullName: ChessmanTests.ShouldInitializeAttackMovePlate_Left_Pawn resultStatus: 1 - duration: 0.0010109 + duration: 0.0015282 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1273,7 +503,7 @@ MonoBehaviour: name: ShouldInitializeAttackMovePlate_Queen_Up fullName: ChessmanTests.ShouldInitializeAttackMovePlate_Queen_Up resultStatus: 1 - duration: 0.0012158 + duration: 0.0018365 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1295,7 +525,7 @@ MonoBehaviour: name: ShouldInitializeAttackMovePlate_Right_Pawn fullName: ChessmanTests.ShouldInitializeAttackMovePlate_Right_Pawn resultStatus: 1 - duration: 0.0011962 + duration: 0.0014851 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1317,7 +547,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_BlackBishop fullName: ChessmanTests.ShouldInitializeMovePlate_BlackBishop resultStatus: 1 - duration: 0.0008644 + duration: 0.0012823 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1339,7 +569,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_BlackKing fullName: ChessmanTests.ShouldInitializeMovePlate_BlackKing resultStatus: 1 - duration: 0.0009618 + duration: 0.0015256 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1361,7 +591,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_BlackKnight fullName: ChessmanTests.ShouldInitializeMovePlate_BlackKnight resultStatus: 1 - duration: 0.0007937 + duration: 0.0011503 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1383,7 +613,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_BlackPawn fullName: ChessmanTests.ShouldInitializeMovePlate_BlackPawn resultStatus: 1 - duration: 0.0013425 + duration: 0.0018015 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1405,7 +635,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_BlackQueen fullName: ChessmanTests.ShouldInitializeMovePlate_BlackQueen resultStatus: 1 - duration: 0.0010634 + duration: 0.0016495 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1427,7 +657,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_BlackTower fullName: ChessmanTests.ShouldInitializeMovePlate_BlackTower resultStatus: 1 - duration: 0.0009784 + duration: 0.0015281 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1449,7 +679,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_WhiteBishop fullName: ChessmanTests.ShouldInitializeMovePlate_WhiteBishop resultStatus: 1 - duration: 0.001056 + duration: 0.0016566 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1471,7 +701,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_WhiteKing fullName: ChessmanTests.ShouldInitializeMovePlate_WhiteKing resultStatus: 1 - duration: 0.0009404 + duration: 0.0018033 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1493,7 +723,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_WhiteKnight fullName: ChessmanTests.ShouldInitializeMovePlate_WhiteKnight resultStatus: 1 - duration: 0.0010126 + duration: 0.0016259 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1515,7 +745,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_WhitePawn fullName: ChessmanTests.ShouldInitializeMovePlate_WhitePawn resultStatus: 1 - duration: 0.0155234 + duration: 0.0204167 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1537,7 +767,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_WhiteQueen fullName: ChessmanTests.ShouldInitializeMovePlate_WhiteQueen resultStatus: 1 - duration: 0.0011271 + duration: 0.0017163 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1559,7 +789,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_WhiteTower fullName: ChessmanTests.ShouldInitializeMovePlate_WhiteTower resultStatus: 1 - duration: 0.0010361 + duration: 0.0016945 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1581,7 +811,7 @@ MonoBehaviour: name: ShouldInitializeOneMovePlate_Pawn fullName: ChessmanTests.ShouldInitializeOneMovePlate_Pawn resultStatus: 1 - duration: 0.0007871 + duration: 0.0012042 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1598,80 +828,59 @@ MonoBehaviour: - Uncategorized parentId: 1001 parentUniqueId: Tests.dll/[Tests][ChessmanTests][suite] - - id: 1009 + - id: 1020 uniqueId: Tests.dll/[Tests][GameTests][suite] name: GameTests fullName: GameTests resultStatus: 1 - duration: 0.0351051 + duration: 0.9649318 messages: - output: 'ArgumentException: The Object you want to instantiate is null. - - ArgumentException: - The Object you want to instantiate is null. - - ArgumentException: The - Object you want to instantiate is null. - - ArgumentException: The Object - you want to instantiate is null. - - ArgumentException: The Object you - want to instantiate is null. - - ArgumentException: The Object you want - to instantiate is null. - - ArgumentException: The Object you want to - instantiate is null. - - ArgumentException: The Object you want to instantiate - is null. - - ArgumentException: The Object you want to instantiate is - null. - - ArgumentException: The Object you want to instantiate is null. - - ArgumentException: - The Object you want to instantiate is null. - - ArgumentException: The - Object you want to instantiate is null. - - ArgumentException: The Object - you want to instantiate is null. - - ArgumentException: The Object you - want to instantiate is null. - - ArgumentException: The Object you want - to instantiate is null. - - ArgumentException: The Object you want to - instantiate is null. - - ArgumentException: The Object you want to instantiate - is null. - - ArgumentException: The Object you want to instantiate is - null. - -' + output: "ArgumentException: The Object you want to instantiate is null.\r\nSentry: + (Warning) Failed to end session because there is none active. \r\nArgumentException: + The Object you want to instantiate is null.\r\nSentry: (Warning) Failed to + end session because there is none active. \r\nArgumentException: The Object + you want to instantiate is null.\r\nSentry: (Warning) Failed to end session + because there is none active. \r\nArgumentException: The Object you want + to instantiate is null.\r\nSentry: (Warning) Failed to end session because + there is none active. \r\nArgumentException: The Object you want to instantiate + is null.\r\nSentry: (Warning) Failed to end session because there is none + active. \r\nArgumentException: The Object you want to instantiate is null.\r\nSentry: + (Warning) Failed to end session because there is none active. \r\nArgumentException: + The Object you want to instantiate is null.\r\nSentry: (Warning) Failed to + end session because there is none active. \r\nArgumentException: The Object + you want to instantiate is null.\r\nSentry: (Warning) Failed to end session + because there is none active. \r\nArgumentException: The Object you want + to instantiate is null.\r\nSentry: (Warning) Failed to end session because + there is none active. \r\nArgumentException: The Object you want to instantiate + is null.\r\nSentry: (Warning) Failed to end session because there is none + active. \r\nArgumentException: The Object you want to instantiate is null.\r\nSentry: + (Warning) Failed to end session because there is none active. \r\nArgumentException: + The Object you want to instantiate is null.\r\nSentry: (Warning) Failed to + end session because there is none active. \r\nArgumentException: The Object + you want to instantiate is null.\r\nSentry: (Warning) Failed to end session + because there is none active. \r\nArgumentException: The Object you want + to instantiate is null.\r\nSentry: (Warning) Failed to end session because + there is none active. \r\nArgumentException: The Object you want to instantiate + is null.\r\nSentry: (Warning) Failed to end session because there is none + active. \r\nArgumentException: The Object you want to instantiate is null.\r\nSentry: + (Warning) Failed to end session because there is none active. \r\nArgumentException: + The Object you want to instantiate is null.\r\nSentry: (Warning) Failed to + end session because there is none active. \r\nArgumentException: The Object + you want to instantiate is null.\r\n" stacktrace: notRunnable: 0 ignoredOrSkipped: 0 description: isSuite: 1 categories: [] - parentId: 1026 - parentUniqueId: '[Tests][D:/Unity/Projects/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' - - id: 1012 + parentId: 1039 + parentUniqueId: '[Tests][C:/Users/johan/Documents/GitHub/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' + - id: 1023 uniqueId: Tests.dll/GameTests/[Tests][GameTests.Create_PieceInstantiatedWithCorrectProperties] name: Create_PieceInstantiatedWithCorrectProperties fullName: GameTests.Create_PieceInstantiatedWithCorrectProperties resultStatus: 1 - duration: 0.002801 + duration: 0.0019761 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1686,14 +895,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1009 + parentId: 1020 parentUniqueId: Tests.dll/[Tests][GameTests][suite] - - id: 1013 + - id: 1024 uniqueId: Tests.dll/GameTests/[Tests][GameTests.PlayerTurns_Tests] name: PlayerTurns_Tests fullName: GameTests.PlayerTurns_Tests resultStatus: 1 - duration: 0.0004935 + duration: 0.0008719 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1708,14 +917,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1009 + parentId: 1020 parentUniqueId: Tests.dll/[Tests][GameTests][suite] - - id: 1011 + - id: 1022 uniqueId: Tests.dll/GameTests/[Tests][GameTests.PositionOnBoard_PositionOutOfBounds_ReturnsFalse] name: PositionOnBoard_PositionOutOfBounds_ReturnsFalse fullName: GameTests.PositionOnBoard_PositionOutOfBounds_ReturnsFalse resultStatus: 1 - duration: 0.0006925 + duration: 0.0010934 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1730,14 +939,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1009 + parentId: 1020 parentUniqueId: Tests.dll/[Tests][GameTests][suite] - - id: 1010 + - id: 1021 uniqueId: Tests.dll/GameTests/[Tests][GameTests.PositionOnBoard_PositionWithinBounds_ReturnsTrue] name: PositionOnBoard_PositionWithinBounds_ReturnsTrue fullName: GameTests.PositionOnBoard_PositionWithinBounds_ReturnsTrue resultStatus: 1 - duration: 0.0005556 + duration: 0.0009609 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1752,14 +961,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1009 + parentId: 1020 parentUniqueId: Tests.dll/[Tests][GameTests][suite] - - id: 1015 + - id: 1026 uniqueId: Tests.dll/GameTests/[Tests][GameTests.ShoudStartGame_Test] name: ShoudStartGame_Test fullName: GameTests.ShoudStartGame_Test resultStatus: 1 - duration: 0.0015418 + duration: 0.0022495 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1774,14 +983,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1009 + parentId: 1020 parentUniqueId: Tests.dll/[Tests][GameTests][suite] - - id: 1014 + - id: 1025 uniqueId: "Tests.dll/GameTests/[Tests][GameTests.ShouldInitializeAllP\xECeces_Test]" name: "ShouldInitializeAllP\xECeces_Test" fullName: "GameTests.ShouldInitializeAllP\xECeces_Test" resultStatus: 1 - duration: 0.0106354 + duration: 0.0151626 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1796,14 +1005,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1009 + parentId: 1020 parentUniqueId: Tests.dll/[Tests][GameTests][suite] - id: 1027 uniqueId: Tests.dll/[Tests][MenuControllerTests][suite] name: MenuControllerTests fullName: MenuControllerTests - resultStatus: 0 - duration: 0 + resultStatus: 1 + duration: 1.265045 messages: output: stacktrace: @@ -1812,14 +1021,14 @@ MonoBehaviour: description: isSuite: 1 categories: [] - parentId: 1041 - parentUniqueId: '[Tests][D:/Unity/Projects/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' + parentId: 1039 + parentUniqueId: '[Tests][C:/Users/johan/Documents/GitHub/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' - id: 1028 uniqueId: Tests.dll/MenuControllerTests/[Tests][MenuControllerTests.StartGame_LoadsMainScene] name: StartGame_LoadsMainScene fullName: MenuControllerTests.StartGame_LoadsMainScene - resultStatus: 0 - duration: 0 + resultStatus: 1 + duration: 1.2354583 messages: output: stacktrace: @@ -1831,12 +1040,12 @@ MonoBehaviour: - Uncategorized parentId: 1027 parentUniqueId: Tests.dll/[Tests][MenuControllerTests][suite] - - id: 1016 + - id: 1029 uniqueId: Tests.dll/[Tests][MovementTest][suite] name: MovementTest fullName: MovementTest resultStatus: 1 - duration: 0.0246257 + duration: 0.0325978 messages: output: stacktrace: @@ -1845,31 +1054,14 @@ MonoBehaviour: description: isSuite: 1 categories: [] - parentId: 1026 - parentUniqueId: '[Tests][D:/Unity/Projects/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' - - id: 1039 - uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Checkmate_Test] - name: Checkmate_Test - fullName: MovementTest.Checkmate_Test - resultStatus: 0 - duration: 0 - messages: - output: - stacktrace: - notRunnable: 0 - ignoredOrSkipped: 0 - description: - isSuite: 0 - categories: - - Uncategorized - parentId: 1029 - parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1020 + parentId: 1039 + parentUniqueId: '[Tests][C:/Users/johan/Documents/GitHub/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' + - id: 1033 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_BishopToSelectedPosition] name: Move_BishopToSelectedPosition fullName: MovementTest.Move_BishopToSelectedPosition resultStatus: 1 - duration: 0.0024881 + duration: 0.0049693 messages: output: stacktrace: @@ -1879,14 +1071,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 + parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1017 + - id: 1030 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_KnightToSelectedPosition] name: Move_KnightToSelectedPosition fullName: MovementTest.Move_KnightToSelectedPosition resultStatus: 1 - duration: 0.0005617 + duration: 0.0014105 messages: output: stacktrace: @@ -1896,14 +1088,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 + parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1018 + - id: 1031 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_PawnToSelectedPosition] name: Move_PawnToSelectedPosition fullName: MovementTest.Move_PawnToSelectedPosition resultStatus: 1 - duration: 0.0005528 + duration: 0.0018439 messages: output: stacktrace: @@ -1913,14 +1105,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 + parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1025 + - id: 1038 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_QueenKingToSelectedPositionAxis] name: Move_QueenKingToSelectedPositionAxis fullName: MovementTest.Move_QueenKingToSelectedPositionAxis resultStatus: 1 - duration: 0.0005245 + duration: 0.001304 messages: output: stacktrace: @@ -1930,14 +1122,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 + parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1022 + - id: 1035 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_QueenKingToSelectedPositionDown] name: Move_QueenKingToSelectedPositionDown fullName: MovementTest.Move_QueenKingToSelectedPositionDown resultStatus: 1 - duration: 0.0005237 + duration: 0.0011139 messages: output: stacktrace: @@ -1947,14 +1139,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 + parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1024 + - id: 1037 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_QueenKingToSelectedPositionLeft] name: Move_QueenKingToSelectedPositionLeft fullName: MovementTest.Move_QueenKingToSelectedPositionLeft resultStatus: 1 - duration: 0.000527 + duration: 0.0009016 messages: output: stacktrace: @@ -1964,14 +1156,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 + parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1023 + - id: 1036 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_QueenKingToSelectedPositionRight] name: Move_QueenKingToSelectedPositionRight fullName: MovementTest.Move_QueenKingToSelectedPositionRight resultStatus: 1 - duration: 0.0005203 + duration: 0.0008748 messages: output: stacktrace: @@ -1981,14 +1173,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 + parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1021 + - id: 1034 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_QueenKingToSelectedPositionUP] name: Move_QueenKingToSelectedPositionUP fullName: MovementTest.Move_QueenKingToSelectedPositionUP resultStatus: 1 - duration: 0.0005232 + duration: 0.0011086 messages: output: stacktrace: @@ -1998,31 +1190,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 + parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1019 + - id: 1032 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_TowerToSelectedPosition] name: Move_TowerToSelectedPosition fullName: MovementTest.Move_TowerToSelectedPosition resultStatus: 1 - duration: 0.0005214 - messages: - output: - stacktrace: - notRunnable: 0 - ignoredOrSkipped: 0 - description: - isSuite: 0 - categories: - - Uncategorized - parentId: 1016 - parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1040 - uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.RedMoveplate_Test] - name: RedMoveplate_Test - fullName: MovementTest.RedMoveplate_Test - resultStatus: 0 - duration: 0 + duration: 0.000919 messages: output: stacktrace: @@ -2034,13 +1209,13 @@ MonoBehaviour: - Uncategorized parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - m_ResultText: chess-game-project (1.398s) + m_ResultText: chess-game-project (2,699s) m_ResultStacktrace: m_TestListState: scrollPos: {x: 0, y: 0} m_SelectedIDs: cb26407e m_LastClickedID: 2118133451 - m_ExpandedIDs: 03149dec5c42d5edfa2eb317bb864b249a6f8268dce72a71cb26407effffff7f + m_ExpandedIDs: 03149dec5c42d5edfa2eb317bb864b24681c89409a6f8268dce72a71cb26407effffff7f m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -2068,7 +1243,7 @@ MonoBehaviour: - Uncategorized m_SelectedOption: 0 m_EditModeTestListGUI: - m_Window: {fileID: 18} + m_Window: {fileID: 14} m_NewResultList: - id: 1000 uniqueId: '[chess-game-project][suite]' @@ -2118,7 +1293,7 @@ MonoBehaviour: selectedCategoryMask: 0 availableCategories: - Uncategorized ---- !u!114 &19 +--- !u!114 &15 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2175,7 +1350,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 60.600006} m_SelectedIDs: 926e0000 m_LastClickedID: 28306 - m_ExpandedIDs: 00000000426100004461000046610000486100004a6100004c610000 + m_ExpandedIDs: 000000000460000006600000086000000a6000000c6000000e60000010600000126000001460000016600000186000001a6000001c600000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -2203,7 +1378,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 00000000426100004461000046610000486100004a6100004c610000 + m_ExpandedIDs: 000000000460000006600000086000000a6000000c6000000e60000010600000126000001460000016600000186000001a6000001c600000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -2247,7 +1422,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 10} + m_ClientGUIView: {fileID: 7} m_CreateAssetUtility: m_EndAction: {fileID: 0} m_InstanceID: 0 @@ -2259,7 +1434,7 @@ MonoBehaviour: m_GridSize: 64 m_SkipHiddenPackages: 0 m_DirectoriesAreaWidth: 207 ---- !u!114 &20 +--- !u!114 &16 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2279,10 +1454,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1460 - y: 819 - width: 449 - height: 164 + x: 1682 + y: 862 + width: 237 + height: 177 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -2301,7 +1476,7 @@ MonoBehaviour: m_LockTracker: m_IsLocked: 0 m_PreviewWindow: {fileID: 0} ---- !u!114 &21 +--- !u!114 &17 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2321,10 +1496,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 8 - y: 83 - width: 358 - height: 524 + x: 0 + y: 73 + width: 411 + height: 426 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -2335,7 +1510,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 1afbffff + m_ExpandedIDs: 14e4ffff4ce4ffffbef8ffff9efaffff m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -2351,7 +1526,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 9} + m_ClientGUIView: {fileID: 6} m_SearchString: m_ExpandedScenes: [] m_CurrenRootInstanceID: 0 @@ -2359,7 +1534,7 @@ MonoBehaviour: m_IsLocked: 0 m_CurrentSortingName: TransformSorting m_WindowGUID: 4c969a2b90040154d917609493e03593 ---- !u!114 &22 +--- !u!114 &18 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2640,9 +1815,9 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: -0.6088897, y: 0.15133493, z: 640.96497} + m_Target: {x: 0.5197881, y: 0.3914951, z: 58.432983} speed: 2 - m_Value: {x: -0.6088897, y: 0.15133493, z: 640.96497} + m_Value: {x: 0.5197881, y: 0.3914951, z: 58.432983} m_RenderMode: 0 m_CameraMode: drawMode: 0 @@ -2693,9 +1868,9 @@ MonoBehaviour: speed: 2 m_Value: {x: 0, y: 0, z: 0, w: 1} m_Size: - m_Target: 5.5455265 + m_Target: 5.869256 speed: 2 - m_Value: 5.5455265 + m_Value: 5.869256 m_Ortho: m_Target: 1 speed: 2 @@ -2720,7 +1895,7 @@ MonoBehaviour: m_SceneVisActive: 1 m_LastLockedObject: {fileID: 0} m_ViewIsLockedToObject: 0 ---- !u!114 &23 +--- !u!114 &19 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2740,10 +1915,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 367 - y: 83 - width: 1091 - height: 524 + x: 412 + y: 73 + width: 1268 + height: 426 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -2791,29 +1966,29 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 21 - width: 1091 - height: 503 - m_Scale: {x: 0.46574077, y: 0.46574074} - m_Translation: {x: 545.5, y: 251.5} + width: 1268 + height: 405 + m_Scale: {x: 0.375, y: 0.375} + m_Translation: {x: 634, y: 202.5} m_MarginLeft: 0 m_MarginRight: 0 m_MarginTop: 0 m_MarginBottom: 0 m_LastShownAreaInsideMargins: serializedVersion: 2 - x: -1171.2524 + x: -1690.6666 y: -540 - width: 2342.505 + width: 3381.3333 height: 1080 m_MinimalGUI: 1 - m_defaultScale: 0.46574074 - m_LastWindowPixelSize: {x: 1091, y: 524} + m_defaultScale: 0.375 + m_LastWindowPixelSize: {x: 1268, y: 426} m_ClearInEditMode: 1 m_NoCameraWarning: 1 m_LowResolutionForAspectRatios: 01000000000000000000 m_XRRenderMode: 0 m_RenderTexture: {fileID: 0} ---- !u!114 &24 +--- !u!114 &20 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2833,10 +2008,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 8 - y: 628 - width: 1451 - height: 355 + x: 0 + y: 520 + width: 1681 + height: 519 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default