Browse Source

passing through in co-op mode

A
Josh 2 years ago
parent
commit
7f68d10a20
  1. 16
      namedropper/Assets/Scenes/Game.unity
  2. 43
      namedropper/Assets/Scripts/Player.cs
  3. 14
      namedropper/Packages/manifest.json
  4. 34
      namedropper/Packages/packages-lock.json
  5. 3
      namedropper/ProjectSettings/EditorBuildSettings.asset
  6. 2
      namedropper/ProjectSettings/Physics2DSettings.asset
  7. 4
      namedropper/ProjectSettings/ProjectVersion.txt
  8. 8
      namedropper/ProjectSettings/TagManager.asset

16
namedropper/Assets/Scenes/Game.unity

@ -241,6 +241,10 @@ PrefabInstance:
propertyPath: m_Name
value: Player Dark Blue
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_IsActive
value: 1
@ -618,6 +622,10 @@ PrefabInstance:
propertyPath: m_Name
value: Player Light Red
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_IsActive
value: 1
@ -1715,6 +1723,10 @@ PrefabInstance:
propertyPath: m_Name
value: Player Dark Red
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Pivot.x
value: 0.5
@ -2044,6 +2056,10 @@ PrefabInstance:
propertyPath: m_Name
value: Player Light Blue
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338381, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_Pivot.x
value: 0.5

43
namedropper/Assets/Scripts/Player.cs

@ -37,24 +37,63 @@ public class Player : MonoBehaviour
if (GameManager.Instance.NumPlayers == 1)
{
if (_playerNumber != 1)
if (_playerNumber != 2)
{
gameObject.SetActive(false);
}
}
else if (GameManager.Instance.NumPlayers == 2)
{
if (_playerNumber != 1 && _playerNumber != 3)
//player 1 remains on team 1
if (_playerNumber == 2 || _playerNumber == 4)
{
gameObject.SetActive(false);
}
if (_playerNumber == 3 && GameManager.Instance.Competitive)
{
gameObject.layer = LayerMask.NameToLayer("Team 2");
}
}
else if (GameManager.Instance.NumPlayers == 3)
{
//player 1 remains on team 1
if (_playerNumber == 2)
{
gameObject.SetActive(false);
}
if (_playerNumber == 3 && GameManager.Instance.Competitive)
{
gameObject.layer = LayerMask.NameToLayer("Team 2");
}
if (_playerNumber == 4 && GameManager.Instance.Competitive)
{
gameObject.layer = LayerMask.NameToLayer("Team 3");
}
}
else if (GameManager.Instance.NumPlayers == 4 && GameManager.Instance.Competitive)
{
//player 1 remains on team 1
if (_playerNumber == 2)
{
gameObject.layer = LayerMask.NameToLayer("Team 2");
}
if (_playerNumber == 3)
{
gameObject.layer = LayerMask.NameToLayer("Team 3");
}
if (_playerNumber == 4)
{
gameObject.layer = LayerMask.NameToLayer("Team 4");
}
}
}

14
namedropper/Packages/manifest.json

@ -1,16 +1,16 @@
{
"dependencies": {
"com.unity.2d.animation": "5.0.10",
"com.unity.2d.animation": "5.2.0",
"com.unity.2d.pixel-perfect": "4.0.1",
"com.unity.2d.psdimporter": "4.1.3",
"com.unity.2d.psdimporter": "4.3.0",
"com.unity.2d.sprite": "1.0.0",
"com.unity.2d.spriteshape": "5.1.7",
"com.unity.2d.spriteshape": "5.3.0",
"com.unity.2d.tilemap": "1.0.0",
"com.unity.collab-proxy": "1.15.7",
"com.unity.ide.rider": "2.0.7",
"com.unity.collab-proxy": "1.17.7",
"com.unity.ide.rider": "3.0.17",
"com.unity.ide.visualstudio": "2.0.17",
"com.unity.ide.vscode": "1.2.4",
"com.unity.test-framework": "1.1.29",
"com.unity.ide.vscode": "1.2.5",
"com.unity.test-framework": "1.1.33",
"com.unity.textmeshpro": "3.0.6",
"com.unity.timeline": "1.4.8",
"com.unity.ugui": "1.0.0",

34
namedropper/Packages/packages-lock.json

@ -1,11 +1,11 @@
{
"dependencies": {
"com.unity.2d.animation": {
"version": "5.0.10",
"version": "5.2.0",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.2d.common": "4.0.4",
"com.unity.2d.common": "4.2.0",
"com.unity.mathematics": "1.1.0",
"com.unity.2d.sprite": "1.0.0",
"com.unity.modules.animation": "1.0.0",
@ -14,7 +14,7 @@
"url": "https://packages.unity.com"
},
"com.unity.2d.common": {
"version": "4.0.4",
"version": "4.2.0",
"depth": 1,
"source": "registry",
"dependencies": {
@ -38,12 +38,12 @@
"url": "https://packages.unity.com"
},
"com.unity.2d.psdimporter": {
"version": "4.1.3",
"version": "4.3.0",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.2d.common": "4.0.4",
"com.unity.2d.animation": "5.0.10",
"com.unity.2d.common": "4.2.0",
"com.unity.2d.animation": "5.2.0",
"com.unity.2d.sprite": "1.0.0"
},
"url": "https://packages.unity.com"
@ -55,12 +55,12 @@
"dependencies": {}
},
"com.unity.2d.spriteshape": {
"version": "5.1.7",
"version": "5.3.0",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.mathematics": "1.1.0",
"com.unity.2d.common": "4.0.4",
"com.unity.2d.common": "4.2.0",
"com.unity.2d.path": "4.0.2",
"com.unity.modules.physics2d": "1.0.0"
},
@ -73,11 +73,10 @@
"dependencies": {}
},
"com.unity.collab-proxy": {
"version": "1.15.7",
"version": "1.17.7",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.nuget.newtonsoft-json": "2.0.0",
"com.unity.services.core": "1.0.1"
},
"url": "https://packages.unity.com"
@ -90,11 +89,11 @@
"url": "https://packages.unity.com"
},
"com.unity.ide.rider": {
"version": "2.0.7",
"version": "3.0.17",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.test-framework": "1.1.1"
"com.unity.ext.nunit": "1.0.6"
},
"url": "https://packages.unity.com"
},
@ -108,7 +107,7 @@
"url": "https://packages.unity.com"
},
"com.unity.ide.vscode": {
"version": "1.2.4",
"version": "1.2.5",
"depth": 0,
"source": "registry",
"dependencies": {},
@ -121,13 +120,6 @@
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.nuget.newtonsoft-json": {
"version": "2.0.0",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.services.core": {
"version": "1.0.1",
"depth": 1,
@ -138,7 +130,7 @@
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
"version": "1.1.29",
"version": "1.1.33",
"depth": 0,
"source": "registry",
"dependencies": {

3
namedropper/ProjectSettings/EditorBuildSettings.asset

@ -8,6 +8,9 @@ EditorBuildSettings:
- enabled: 0
path:
guid: 00000000000000000000000000000000
- enabled: 1
path: Assets/Scenes/Title.unity
guid: 6ee247bbdb0f38647998cd2523f264c7
- enabled: 1
path: Assets/Scenes/TopicSelect.unity
guid: 91a4af9a6af9fc840b522128085513da

2
namedropper/ProjectSettings/Physics2DSettings.asset

@ -53,4 +53,4 @@ Physics2DSettings:
m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffbfffffff7ffffffffffefffffffdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

4
namedropper/ProjectSettings/ProjectVersion.txt

@ -1,2 +1,2 @@
m_EditorVersion: 2020.3.26f1
m_EditorVersionWithRevision: 2020.3.26f1 (7298b473bc1a)
m_EditorVersion: 2020.3.44f1
m_EditorVersionWithRevision: 2020.3.44f1 (7f159b6136da)

8
namedropper/ProjectSettings/TagManager.asset

@ -11,10 +11,10 @@ TagManager:
-
- Water
- UI
-
-
-
-
- Team 1
- Team 2
- Team 3
- Team 4
-
-
-

Loading…
Cancel
Save