Compare commits

...

5 Commits

  1. 90
      Assets/Scenes/Main.unity
  2. 5
      Assets/Scripts/Game/GameManager.cs
  3. 8
      Assets/UI.meta
  4. 4
      Assets/UI/Game.uxml
  5. 0
      Assets/UI/Game.uxml.meta
  6. 4
      Assets/UI/GamePanel.asset
  7. 0
      Assets/UI/GamePanel.asset.meta
  8. 7
      Assets/UI/Menu.uxml
  9. 0
      Assets/UI/Menu.uxml.meta
  10. 37
      Assets/UI/MenuPanel.asset
  11. 8
      Assets/UI/MenuPanel.asset.meta
  12. 4
      Assets/UI/PlayerUI.uxml
  13. 0
      Assets/UI/PlayerUI.uxml.meta
  14. 8
      Assets/UI/Styles.meta
  15. 0
      Assets/UI/Styles/game.uss
  16. 0
      Assets/UI/Styles/game.uss.meta
  17. 3
      Assets/UI/Styles/global.uss
  18. 11
      Assets/UI/Styles/global.uss.meta
  19. 15
      Assets/UI/Styles/menu.uss
  20. 0
      Assets/UI/Styles/menu.uss.meta
  21. 0
      Assets/UI/Styles/player_panel.uss
  22. 0
      Assets/UI/Styles/player_panel.uss.meta
  23. 2
      Packages/manifest.json
  24. 2
      Packages/packages-lock.json
  25. 4
      ProjectSettings/ProjectSettings.asset
  26. 1
      README.md

@ -198,7 +198,7 @@ Transform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 2 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &558072412 --- !u!114 &558072412
MonoBehaviour: MonoBehaviour:
@ -212,7 +212,7 @@ MonoBehaviour:
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0} m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_PanelSettings: {fileID: 11400000, guid: 396b0e76323d0ce25b53e9c9c51106c7, type: 2} m_PanelSettings: {fileID: 11400000, guid: 2ed681da194cc15f383dd20d59d1226f, type: 2}
m_ParentUI: {fileID: 0} m_ParentUI: {fileID: 0}
sourceAsset: {fileID: 9197481963319205126, guid: 8c18fadf28797192cb95360376cdf508, type: 3} sourceAsset: {fileID: 9197481963319205126, guid: 8c18fadf28797192cb95360376cdf508, type: 3}
m_SortingOrder: 0 m_SortingOrder: 0
@ -228,90 +228,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8563a49d0f8f416b8de4ccb2d65a40f8, type: 3} m_Script: {fileID: 11500000, guid: 8563a49d0f8f416b8de4ccb2d65a40f8, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!1 &1290185475
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1290185478}
- component: {fileID: 1290185477}
- component: {fileID: 1290185476}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &1290185476
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1290185475}
m_Enabled: 1
--- !u!20 &1290185477
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1290185475}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1290185478
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1290185475}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2137504927 --- !u!1 &2137504927
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -408,5 +324,5 @@ Transform:
m_Children: m_Children:
- {fileID: 132636180} - {fileID: 132636180}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 1 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

@ -53,7 +53,7 @@ namespace Game {
} }
private IEnumerator SpawnLoop(Spawnable spawnable) { private IEnumerator SpawnLoop(Spawnable spawnable) {
SpawnRate required = SpawnRate.Normal; //Settings.SpawnRates[spawnable]; SpawnRate required = Settings.SpawnRates[spawnable];
if (required == SpawnRate.Never) if (required == SpawnRate.Never)
yield break; yield break;
float baseSeconds = spawnRates.First(s => s.spawnable == spawnable).values.First(v => v.spawnRate == required).baseSeconds; float baseSeconds = spawnRates.First(s => s.spawnable == spawnable).values.First(v => v.spawnRate == required).baseSeconds;
@ -85,9 +85,6 @@ namespace Game {
} }
private void SetupPlayers() { private void SetupPlayers() {
Settings.Type = Type.Hybrid;
Settings.AIDifficulty = Difficulty.VeryHard;
var p1Obj = Instantiate(playerPrefab); var p1Obj = Instantiate(playerPrefab);
var p2Obj = Instantiate(playerPrefab); var p2Obj = Instantiate(playerPrefab);

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 46686cf9748bd11bcbf2f7c49bb46e7f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -1,6 +1,6 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False"> <ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
<ui:Template name="PlayerUI" src="project://database/Assets/UI%20Toolkit/PlayerUI.uxml?fileID=9197481963319205126&amp;guid=f83e3a5bf897cb9399b43ba72f615230&amp;type=3#PlayerUI" /> <ui:Template name="PlayerUI" src="project://database/Assets/UI/PlayerUI.uxml?fileID=9197481963319205126&amp;guid=f83e3a5bf897cb9399b43ba72f615230&amp;type=3#PlayerUI" />
<Style src="project://database/Assets/UI%20Toolkit/game.uss?fileID=7433441132597879392&amp;guid=4bc158fcb2310ba5db253a0bc45b03e4&amp;type=3#game" /> <Style src="project://database/Assets/UI/Styles/game.uss?fileID=7433441132597879392&amp;guid=4bc158fcb2310ba5db253a0bc45b03e4&amp;type=3#game" />
<ui:Instance template="PlayerUI" name="PlayerTop" class="player_panel" style="top: 0;" /> <ui:Instance template="PlayerUI" name="PlayerTop" class="player_panel" style="top: 0;" />
<ui:Instance template="PlayerUI" name="PlayerBottom" class="player_panel" style="bottom: 0;" /> <ui:Instance template="PlayerUI" name="PlayerBottom" class="player_panel" style="bottom: 0;" />
</ui:UXML> </ui:UXML>

@ -10,7 +10,7 @@ MonoBehaviour:
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 19101, guid: 0000000000000000e000000000000000, type: 0} m_Script: {fileID: 19101, guid: 0000000000000000e000000000000000, type: 0}
m_Name: PanelSettings m_Name: GamePanel
m_EditorClassIdentifier: m_EditorClassIdentifier:
themeUss: {fileID: -4733365628477956816, guid: 87c5f501dc6f5fb448eef0f9f3bffa1c, type: 3} themeUss: {fileID: -4733365628477956816, guid: 87c5f501dc6f5fb448eef0f9f3bffa1c, type: 3}
m_TargetTexture: {fileID: 0} m_TargetTexture: {fileID: 0}
@ -20,7 +20,7 @@ MonoBehaviour:
m_FallbackDpi: 96 m_FallbackDpi: 96
m_ReferenceResolution: {x: 1200, y: 800} m_ReferenceResolution: {x: 1200, y: 800}
m_ScreenMatchMode: 0 m_ScreenMatchMode: 0
m_Match: 0 m_Match: 0.514
m_SortingOrder: 0 m_SortingOrder: 0
m_TargetDisplay: 0 m_TargetDisplay: 0
m_ClearDepthStencil: 1 m_ClearDepthStencil: 1

@ -1,7 +1,8 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False"> <ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
<Style src="project://database/Assets/UI%20Toolkit/styles.uss?fileID=7433441132597879392&amp;guid=a6abab2f6d20ba823bad41d2081810e9&amp;type=3#styles" /> <Style src="project://database/Assets/UI/Styles/menu.uss?fileID=7433441132597879392&amp;guid=a6abab2f6d20ba823bad41d2081810e9&amp;type=3#menu" />
<ui:Label text="Pong Remastered" display-tooltip-when-elided="true" name="top_header" class="header" /> <Style src="project://database/Assets/UI/Styles/global.uss?fileID=7433441132597879392&amp;guid=f6d2ff1ab9bcd826f88710e642615fa6&amp;type=3#global" />
<ui:VisualElement name="main_menu" class="menu" style="display: flex; visibility: visible;"> <ui:Label text="Pong Reloaded" display-tooltip-when-elided="true" name="top_header" class="header" />
<ui:VisualElement name="main_menu" class="menu" style="display: flex;">
<ui:Button text="Play" display-tooltip-when-elided="true" name="btn_play" /> <ui:Button text="Play" display-tooltip-when-elided="true" name="btn_play" />
<ui:Button text="Settings" display-tooltip-when-elided="true" name="btn_settings" /> <ui:Button text="Settings" display-tooltip-when-elided="true" name="btn_settings" />
</ui:VisualElement> </ui:VisualElement>

@ -0,0 +1,37 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 19101, guid: 0000000000000000e000000000000000, type: 0}
m_Name: MenuPanel
m_EditorClassIdentifier:
themeUss: {fileID: -4733365628477956816, guid: 87c5f501dc6f5fb448eef0f9f3bffa1c, type: 3}
m_TargetTexture: {fileID: 0}
m_ScaleMode: 2
m_Scale: 1
m_ReferenceDpi: 96
m_FallbackDpi: 96
m_ReferenceResolution: {x: 350, y: 800}
m_ScreenMatchMode: 0
m_Match: 0.5
m_SortingOrder: 0
m_TargetDisplay: 0
m_ClearDepthStencil: 1
m_ClearColor: 0
m_ColorClearValue: {r: 0, g: 0, b: 0, a: 0}
m_DynamicAtlasSettings:
m_MinAtlasSize: 64
m_MaxAtlasSize: 4096
m_MaxSubTextureSize: 64
m_ActiveFilters: 31
m_AtlasBlitShader: {fileID: 9101, guid: 0000000000000000f000000000000000, type: 0}
m_RuntimeShader: {fileID: 9100, guid: 0000000000000000f000000000000000, type: 0}
m_RuntimeWorldShader: {fileID: 9102, guid: 0000000000000000f000000000000000, type: 0}
textSettings: {fileID: 0}

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2ed681da194cc15f383dd20d59d1226f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

@ -1,6 +1,6 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False"> <ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
<Style src="project://database/Assets/UI%20Toolkit/styles.uss?fileID=7433441132597879392&amp;guid=a6abab2f6d20ba823bad41d2081810e9&amp;type=3#styles" /> <Style src="project://database/Assets/UI/Styles/player_panel.uss?fileID=7433441132597879392&amp;guid=102b2cb1b84d8883abde9356b92d807e&amp;type=3#player_panel" />
<Style src="project://database/Assets/UI%20Toolkit/player_panel.uss?fileID=7433441132597879392&amp;guid=102b2cb1b84d8883abde9356b92d807e&amp;type=3#player_panel" /> <Style src="project://database/Assets/UI/Styles/global.uss?fileID=7433441132597879392&amp;guid=f6d2ff1ab9bcd826f88710e642615fa6&amp;type=3#global" />
<ui:Label text="←" display-tooltip-when-elided="true" name="go_left" class="go" /> <ui:Label text="←" display-tooltip-when-elided="true" name="go_left" class="go" />
<ui:VisualElement class="mods_list" /> <ui:VisualElement class="mods_list" />
<ui:Label display-tooltip-when-elided="true" name="score" binding-path="m_Score" /> <ui:Label display-tooltip-when-elided="true" name="score" binding-path="m_Score" />

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d5cea8c79a99ef547b550384d302a4e2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,3 @@
* {
color: rgb(200, 200, 200);
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f6d2ff1ab9bcd826f88710e642615fa6
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
disableValidation: 0

@ -2,12 +2,8 @@
--background-color: rgb(80, 80, 80); --background-color: rgb(80, 80, 80);
} }
* {
color: rgb(200, 200, 200);
}
Button { Button {
margin-right: 10px; margin-right: 5px;
margin-top: 5px; margin-top: 5px;
margin-bottom: 5px; margin-bottom: 5px;
padding-left: 5px; padding-left: 5px;
@ -18,7 +14,7 @@ Button {
border-bottom-left-radius: 10px; border-bottom-left-radius: 10px;
border-top-right-radius: 10px; border-top-right-radius: 10px;
border-bottom-right-radius: 10px; border-bottom-right-radius: 10px;
margin-left: 10px; margin-left: 5px;
background-color: rgb(53, 53, 53); background-color: rgb(53, 53, 53);
border-left-color: rgb(0, 154, 11); border-left-color: rgb(0, 154, 11);
border-right-color: rgb(0, 154, 11); border-right-color: rgb(0, 154, 11);
@ -28,9 +24,12 @@ Button {
border-right-width: 3px; border-right-width: 3px;
border-top-width: 3px; border-top-width: 3px;
border-bottom-width: 3px; border-bottom-width: 3px;
font-size: 30px;
flex-grow: 1;
flex-shrink: 0;
} }
Button:active { Button:hover {
background-color: rgb(71, 71, 71); background-color: rgb(71, 71, 71);
} }
@ -46,7 +45,7 @@ Button:active {
} }
#top_header { #top_header {
font-size: 30px; font-size: 50px;
-unity-font-style: bold; -unity-font-style: bold;
-unity-text-align: upper-center; -unity-text-align: upper-center;
margin-left: 0; margin-left: 0;

@ -3,7 +3,7 @@
"com.unity.adaptiveperformance.samsung.android": "4.0.2", "com.unity.adaptiveperformance.samsung.android": "4.0.2",
"com.unity.collab-proxy": "2.0.0", "com.unity.collab-proxy": "2.0.0",
"com.unity.feature.mobile": "1.0.0", "com.unity.feature.mobile": "1.0.0",
"com.unity.ide.rider": "3.0.18", "com.unity.ide.rider": "3.0.20",
"com.unity.ide.visualstudio": "2.0.17", "com.unity.ide.visualstudio": "2.0.17",
"com.unity.ide.vscode": "1.2.5", "com.unity.ide.vscode": "1.2.5",
"com.unity.inputsystem": "1.4.4", "com.unity.inputsystem": "1.4.4",

@ -63,7 +63,7 @@
} }
}, },
"com.unity.ide.rider": { "com.unity.ide.rider": {
"version": "3.0.18", "version": "3.0.20",
"depth": 0, "depth": 0,
"source": "registry", "source": "registry",
"dependencies": { "dependencies": {

@ -134,7 +134,7 @@ PlayerSettings:
16:10: 1 16:10: 1
16:9: 1 16:9: 1
Others: 1 Others: 1
bundleVersion: 1.0.3 bundleVersion: 1.0.4
preloadedAssets: [] preloadedAssets: []
metroInputSource: 0 metroInputSource: 0
wsaTransparentSwapchain: 0 wsaTransparentSwapchain: 0
@ -165,7 +165,7 @@ PlayerSettings:
iPhone: 0 iPhone: 0
tvOS: 0 tvOS: 0
overrideDefaultApplicationIdentifier: 0 overrideDefaultApplicationIdentifier: 0
AndroidBundleVersionCode: 11 AndroidBundleVersionCode: 12
AndroidMinSdkVersion: 26 AndroidMinSdkVersion: 26
AndroidTargetSdkVersion: 33 AndroidTargetSdkVersion: 33
AndroidPreferredInstallLocation: 1 AndroidPreferredInstallLocation: 1

@ -4,3 +4,4 @@
- Score number rotation - Score number rotation
### Menu ### Menu
-

Loading…
Cancel
Save