Compare commits

..

No commits in common. '94ef5fddfa89d7c2c7d87e872cb75546758a4941' and '45a7823a0774e1d432dab9d454fc5cf1fb2c5b4f' have entirely different histories.

  1. 61
      Assets/Materials/Zone.mat
  2. 8
      Assets/Materials/Zone.mat.meta
  3. 86
      Assets/Prefabs/BorderZone.prefab
  4. 7
      Assets/Prefabs/BorderZone.prefab.meta
  5. 1
      Assets/Scenes/Game.unity
  6. 2
      Assets/Scripts/Game/AIPlayer.cs
  7. 3
      Assets/Scripts/Game/GameManager.cs
  8. 19
      Assets/Scripts/Game/Player.cs
  9. 1179
      Assets/Shaders/GradientSprite.shadergraph
  10. 3342
      Assets/Shaders/Zone.shadergraph
  11. 10
      Assets/Shaders/Zone.shadergraph.meta
  12. 2
      ProjectSettings/ProjectSettings.asset
  13. 3
      README.md

@ -1,61 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Zone
m_Shader: {fileID: -6465566751694194690, guid: 40205d1d7f3ac994fb09829e5ddbad62, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AlphaTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: b95f610dcf05a532c890b8ed252d3ccc, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Angle: -10.1
- _Distance: 0.203
- _EnableExternalAlpha: 0
- _Thickness: 0.0412
m_Colors:
- _Color: {r: 2.9960785, g: 0.03137255, b: 0, a: 1}
- _Flip: {r: 1, g: 1, b: 1, a: 1}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 9cf98893107fc0bcd9136e35ea2cc44d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

@ -1,86 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4827788429173683660
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4827788429173683662}
- component: {fileID: 4827788429173683663}
m_Layer: 0
m_Name: BorderZone
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4827788429173683662
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4827788429173683660}
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: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &4827788429173683663
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4827788429173683660}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 9cf98893107fc0bcd9136e35ea2cc44d, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: b95f610dcf05a532c890b8ed252d3ccc, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 50e7c76b45ba22fb18c0012e23b4b34c
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -1019,7 +1019,6 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
ballPrefab: {fileID: 7041796185663956342, guid: d67d5f2db5f0b3d9d8298731f423a9b6, type: 3} ballPrefab: {fileID: 7041796185663956342, guid: d67d5f2db5f0b3d9d8298731f423a9b6, type: 3}
playerPrefab: {fileID: 5402279313309450415, guid: 32b3bb87d3699d314ace59ddb1674875, type: 3} playerPrefab: {fileID: 5402279313309450415, guid: 32b3bb87d3699d314ace59ddb1674875, type: 3}
borderZonePrefab: {fileID: 4827788429173683660, guid: 50e7c76b45ba22fb18c0012e23b4b34c, type: 3}
modificationPrefab: {fileID: 7947935438987891319, guid: 8db15b80a161e4faf9681d9e29b563ce, type: 3} modificationPrefab: {fileID: 7947935438987891319, guid: 8db15b80a161e4faf9681d9e29b563ce, type: 3}
modifications: modifications:
- {fileID: 11400000, guid: e24dcbc74c0ebdd94acb60adba3415c7, type: 2} - {fileID: 11400000, guid: e24dcbc74c0ebdd94acb60adba3415c7, type: 2}

@ -46,7 +46,7 @@ namespace Game {
return ballVy * transform.up.y < 0; return ballVy * transform.up.y < 0;
} }
// Not euclid, but only y distance // Not manhattan, only Y direction
private float YDistanceToBall(Ball ball) { private float YDistanceToBall(Ball ball) {
return Mathf.Abs(ball.Rb.position.y - Y); return Mathf.Abs(ball.Rb.position.y - Y);
} }

@ -12,7 +12,6 @@ namespace Game {
public Object ballPrefab; public Object ballPrefab;
public Object playerPrefab; public Object playerPrefab;
public Object borderZonePrefab;
public Object modificationPrefab; public Object modificationPrefab;
public ModificationProperties[] modifications; public ModificationProperties[] modifications;
public Object wormholePrefab; public Object wormholePrefab;
@ -91,8 +90,6 @@ namespace Game {
Player1 = p1; Player1 = p1;
Player2 = p2; Player2 = p2;
p1.borderZonePrefab = p2.borderZonePrefab = borderZonePrefab;
} }
private void SpawnNewBall() { private void SpawnNewBall() {

@ -3,7 +3,6 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Unity.Netcode; using Unity.Netcode;
using Unity.VisualScripting;
using UnityEngine; using UnityEngine;
using UnityEngine.UIElements; using UnityEngine.UIElements;
@ -13,10 +12,6 @@ namespace Game {
public class Player : NetworkBehaviour { public class Player : NetworkBehaviour {
public UnityEngine.Object borderZonePrefab;
private Transform borderZoneLeft, borderZoneRight;
private const float BaseSpeed = 15; private const float BaseSpeed = 15;
private const float SpeedMultiplier = 1.5f; private const float SpeedMultiplier = 1.5f;
@ -78,14 +73,6 @@ namespace Game {
private void Update() { private void Update() {
transform.localScale = new Vector3(Width, 1, 1); transform.localScale = new Vector3(Width, 1, 1);
float borderV = Border;
float borderZoneScaleX = Dimensions.Singleton.PlaySize.x / 2 - borderV;
float pos = borderV + borderZoneScaleX / 2;
borderZoneLeft.position = new Vector2(pos, transform.position.y);
borderZoneRight.position = new Vector2(-pos, transform.position.y);
borderZoneLeft.localScale = borderZoneRight.localScale = new Vector3(borderZoneScaleX, 1, 1);
} }
protected void Start() { protected void Start() {
@ -99,12 +86,6 @@ namespace Game {
transform.Rotate(transform.forward, 180); transform.Rotate(transform.forward, 180);
Panel = GameUI.Singleton.PlayerPanel(Side); Panel = GameUI.Singleton.PlayerPanel(Side);
UpdatePanel(); UpdatePanel();
SpawnZones();
}
private void SpawnZones() {
borderZoneLeft = Instantiate(borderZonePrefab).GetComponent<Transform>();
borderZoneRight = Instantiate(borderZonePrefab).GetComponent<Transform>();
} }
public void GainScore() { public void GainScore() {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 40205d1d7f3ac994fb09829e5ddbad62
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}

@ -165,7 +165,7 @@ PlayerSettings:
iPhone: 0 iPhone: 0
tvOS: 0 tvOS: 0
overrideDefaultApplicationIdentifier: 0 overrideDefaultApplicationIdentifier: 0
AndroidBundleVersionCode: 10 AndroidBundleVersionCode: 9
AndroidMinSdkVersion: 24 AndroidMinSdkVersion: 24
AndroidTargetSdkVersion: 33 AndroidTargetSdkVersion: 33
AndroidPreferredInstallLocation: 1 AndroidPreferredInstallLocation: 1

@ -2,5 +2,8 @@
### Game ### Game
- Score number rotation - Score number rotation
- Collectables:
- NewBall
- Border visuals
### Menu ### Menu

Loading…
Cancel
Save