Restructure animations

This commit is contained in:
RochesterX
2025-01-17 12:05:54 -05:00
parent 79e3d3f301
commit 5facf8c6d3
14 changed files with 557 additions and 153 deletions

View File

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

View File

@@ -113,7 +113,7 @@ AnimatorState:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Wild
m_Name: Jump
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
@@ -138,7 +138,7 @@ AnimatorController:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Root
m_Name: Bones
serializedVersion: 5
m_AnimatorParameters:
- m_Name: state
@@ -193,7 +193,7 @@ AnimatorState:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Bones
m_Name: Walk
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []

View File

@@ -6,7 +6,7 @@ AnimationClip:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Wild
m_Name: Jump
serializedVersion: 7
m_Legacy: 0
m_Compressed: 0

View File

@@ -6,7 +6,7 @@ AnimationClip:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Bones
m_Name: Walk
serializedVersion: 7
m_Legacy: 0
m_Compressed: 0
@@ -19,7 +19,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: {x: 0, y: 0, z: 210.722}
value: {x: 0, y: 0, z: 226.804}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
@@ -37,7 +37,7 @@ AnimationClip:
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 0.6666667
value: {x: 0, y: 0, z: 210.722}
value: {x: 0, y: 0, z: 226.804}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
@@ -96,7 +96,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: {x: 0, y: 0, z: 164.974}
value: {x: 0, y: 0, z: 146.038}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
@@ -114,7 +114,7 @@ AnimationClip:
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 0.6666667
value: {x: 0, y: 0, z: 164.974}
value: {x: 0, y: 0, z: 146.038}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
@@ -284,7 +284,7 @@ AnimationClip:
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 0.33333334
value: {x: 0, y: 0, z: 192.912}
value: {x: 0, y: 0, z: 191.046}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
@@ -310,7 +310,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: {x: 0, y: 0, z: 0}
value: {x: 0, y: -0.062, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
@@ -328,8 +328,8 @@ AnimationClip:
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 0.6666667
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
value: {x: 0, y: -0.062, z: 0}
inSlope: {x: 0, y: 0, z: -0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
@@ -536,7 +536,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: 210.722
value: 226.804
inSlope: 0
outSlope: 0
tangentMode: 136
@@ -554,7 +554,7 @@ AnimationClip:
outWeight: 0.33333334
- serializedVersion: 3
time: 0.6666667
value: 210.722
value: 226.804
inSlope: 0
outSlope: 0
tangentMode: 136
@@ -797,7 +797,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: 164.974
value: 146.038
inSlope: 0
outSlope: 0
tangentMode: 136
@@ -815,7 +815,7 @@ AnimationClip:
outWeight: 0.33333334
- serializedVersion: 3
time: 0.6666667
value: 164.974
value: 146.038
inSlope: 0
outSlope: 0
tangentMode: 136
@@ -1370,7 +1370,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: 0
value: -0.062
inSlope: 0
outSlope: 0
tangentMode: 136
@@ -1388,7 +1388,7 @@ AnimationClip:
outWeight: 0.33333334
- serializedVersion: 3
time: 0.6666667
value: 0
value: -0.062
inSlope: 0
outSlope: 0
tangentMode: 136
@@ -1412,7 +1412,7 @@ AnimationClip:
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@@ -1428,9 +1428,9 @@ AnimationClip:
- serializedVersion: 3
time: 0.6666667
value: 0
inSlope: 0
inSlope: -0
outSlope: 0
tangentMode: 136
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
@@ -1535,7 +1535,7 @@ AnimationClip:
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 192.912
value: 191.046
inSlope: 0
outSlope: 0
tangentMode: 136
@@ -1568,7 +1568,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: Torso
path: Torso/Leg L U/Leg L L
classID: 4
script: {fileID: 0}
flags: 0
@@ -1580,7 +1580,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: Torso
path: Torso/Leg L U/Leg L L
classID: 4
script: {fileID: 0}
flags: 0
@@ -1592,7 +1592,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: Torso
path: Torso/Leg L U/Leg L L
classID: 4
script: {fileID: 0}
flags: 0
@@ -1604,7 +1604,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: Torso/Arm L
path: Torso
classID: 4
script: {fileID: 0}
flags: 0
@@ -1616,7 +1616,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: Torso/Arm L
path: Torso
classID: 4
script: {fileID: 0}
flags: 0
@@ -1628,43 +1628,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: Torso/Arm L
classID: 4
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: Torso/Head
classID: 4
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: Torso/Head
classID: 4
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: Torso/Head
path: Torso
classID: 4
script: {fileID: 0}
flags: 0
@@ -1712,7 +1676,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: Torso/Leg L U/Leg L L
path: Torso/Arm L
classID: 4
script: {fileID: 0}
flags: 0
@@ -1724,7 +1688,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: Torso/Leg L U/Leg L L
path: Torso/Arm L
classID: 4
script: {fileID: 0}
flags: 0
@@ -1736,43 +1700,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: Torso/Leg L U/Leg L L
classID: 4
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: Torso/Leg R U
classID: 4
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: Torso/Leg R U
classID: 4
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: Torso/Leg R U
path: Torso/Arm L
classID: 4
script: {fileID: 0}
flags: 0
@@ -1819,7 +1747,7 @@ AnimationClip:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
attribute: m_LocalEulerAngles.z
path: Torso/Leg R U/Leg R L
classID: 4
script: {fileID: 0}
@@ -1843,11 +1771,83 @@ AnimationClip:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
attribute: m_LocalEulerAngles.x
path: Torso/Leg R U/Leg R L
classID: 4
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: Torso/Leg R U
classID: 4
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: Torso/Leg R U
classID: 4
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: Torso/Leg R U
classID: 4
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: Torso/Head
classID: 4
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: Torso/Head
classID: 4
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: Torso/Head
classID: 4
script: {fileID: 0}
flags: 0
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

@@ -104,6 +104,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
speed: 400
isPlayer1: 1
move: {fileID: -944628639613478452, guid: 6cbaae0ad99590d468c8b501c0452c36, type: 3}
--- !u!60 &6715754573185558080
PolygonCollider2D:
m_ObjectHideFlags: 0

View File

@@ -2126,6 +2126,10 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 946501248446145305, guid: 603e313b1bcbb4e7ab65d3ec701ce789, type: 3}
propertyPath: move.m_Name
value: Move
objectReference: {fileID: 0}
- target: {fileID: 2899264478719472934, guid: 603e313b1bcbb4e7ab65d3ec701ce789, type: 3}
propertyPath: m_LocalPosition.x
value: -8

View File

@@ -6,18 +6,37 @@ public class PongPaddleBehavior : MonoBehaviour
public float speed = 5f;
public bool isPlayer1 = true;
private InputAction move;
[SerializeField] private InputActionAsset move;
private Rigidbody2D rb;
private void Start()
{
move = isPlayer1 ? InputSystem.actions.FindAction("Player 1 Move") : InputSystem.actions.FindAction("Player 2 Move");
rb = GetComponent<Rigidbody2D>();
}
private void FixedUpdate()
{
float direction = move.ReadValue<Vector2>().y;
if (!isPlayer1)
{
Transform ball = FindFirstObjectByType<PongBallBehavior>().transform;
RaycastHit2D[] hits = Physics2D.RaycastAll(ball.position, ball.GetComponent<Rigidbody2D>().linearVelocity, Mathf.Infinity, LayerMask.GetMask("Pong Goal"));
Debug.DrawRay(ball.position, ball.GetComponent<Rigidbody2D>().linearVelocity * 1000f, Color.red);
foreach(RaycastHit2D hit in hits)
{
if (hit.collider.gameObject.CompareTag("Pong Goal"))
{
print("Hit");
float dir = transform.position.y - hit.point.y > 0 ? 1 : -1;
rb.linearVelocityY = dir * speed * Time.fixedDeltaTime;
}
}
return;
}
float direction = move.FindAction("Move").ReadValue<Vector2>().y;
if (transform.position.y >= 4 && direction > 0 || transform.position.y <= -4 && direction < 0)
{
direction = 0;

View File

@@ -195,9 +195,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
players: []
spawnPosition: {x: -2, y: 15}
playerActions: {fileID: -944628639613478452, guid: 6cbaae0ad99590d468c8b501c0452c36, type: 3}
player2Actions: {fileID: -944628639613478452, guid: 66bf446e230994f6cb8817e4943f9adf, type: 3}
--- !u!114 &804358386
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -6145,6 +6143,26 @@ Tilemap:
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 15, y: 0, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 16, y: 0, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 17, y: 0, z: 0}
second:
serializedVersion: 2
@@ -6435,6 +6453,26 @@ Tilemap:
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 15, y: 1, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 16, y: 1, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 17, y: 1, z: 0}
second:
serializedVersion: 2
@@ -8315,6 +8353,166 @@ Tilemap:
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 15, y: 7, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 16, y: 7, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 17, y: 7, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 18, y: 7, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 19, y: 7, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 20, y: 7, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 21, y: 7, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 22, y: 7, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 23, y: 7, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 24, y: 7, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 25, y: 7, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 26, y: 7, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 27, y: 7, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 28, y: 7, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 29, y: 7, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 30, y: 7, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -51, y: 8, z: 0}
second:
serializedVersion: 2
@@ -8605,6 +8803,166 @@ Tilemap:
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 15, y: 8, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 16, y: 8, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 17, y: 8, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 18, y: 8, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 19, y: 8, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 20, y: 8, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 21, y: 8, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 22, y: 8, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 23, y: 8, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 24, y: 8, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 25, y: 8, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 26, y: 8, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 27, y: 8, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 28, y: 8, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 29, y: 8, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: 30, y: 8, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -51, y: 9, z: 0}
second:
serializedVersion: 2
@@ -11397,13 +11755,13 @@ Tilemap:
m_AllTileFlags: 1073741825
m_AnimatedTiles: {}
m_TileAssetArray:
- m_RefCount: 1104
- m_RefCount: 1140
m_Data: {fileID: 11400000, guid: 1cf44ad133c006f4e9b30384a5571258, type: 2}
m_TileSpriteArray:
- m_RefCount: 1104
- m_RefCount: 1140
m_Data: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
m_TileMatrixArray:
- m_RefCount: 1104
- m_RefCount: 1140
m_Data:
e00: 1
e01: 0
@@ -11422,13 +11780,13 @@ Tilemap:
e32: 0
e33: 1
m_TileColorArray:
- m_RefCount: 1104
- m_RefCount: 1140
m_Data: {r: 1, g: 1, b: 1, a: 1}
m_TileObjectToInstantiateArray: []
m_AnimationFrameRate: 1
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Origin: {x: -51, y: -15, z: 0}
m_Size: {x: 78, y: 35, z: 1}
m_Size: {x: 82, y: 35, z: 1}
m_TileAnchor: {x: 0.5, y: 0.5, z: 0}
m_TileOrientation: 0
m_TileOrientationMatrix:
@@ -11524,6 +11882,14 @@ CompositeCollider2D:
Y: 80000000
- X: 0
Y: 80000000
- - X: 310000000
Y: 90000000
- X: 150000000
Y: 90000000
- X: 150000000
Y: 70000000
- X: 310000000
Y: 70000000
- - X: 70000000
Y: 80000000
- X: 30000000
@@ -11564,6 +11930,18 @@ CompositeCollider2D:
Y: 20000000
- X: 60000000
Y: 20000000
- - X: 190000000
Y: 20000000
- X: 150000000
Y: 20000000
- X: 150000000
Y: 0
- X: 170000000
Y: 0
- X: 170000000
Y: -30000000
- X: 190000000
Y: -30000000
- - X: 20000000
Y: 20000000
- X: 0
@@ -11572,14 +11950,6 @@ CompositeCollider2D:
Y: -70000000
- X: 20000000
Y: -70000000
- - X: 190000000
Y: 20000000
- X: 170000000
Y: 20000000
- X: 170000000
Y: -30000000
- X: 190000000
Y: -30000000
- - X: 90000000
Y: 10000000
- X: 70000000
@@ -11612,14 +11982,6 @@ CompositeCollider2D:
Y: -30000000
- X: -100000000
Y: -30000000
- - X: 120000000
Y: -20000000
- X: 100000000
Y: -20000000
- X: 100000000
Y: -40000000
- X: 120000000
Y: -40000000
- - X: -60000000
Y: -20000000
- X: -80000000
@@ -11628,6 +11990,26 @@ CompositeCollider2D:
Y: -70000000
- X: -60000000
Y: -70000000
- - X: 120000000
Y: -20000000
- X: 100000000
Y: -20000000
- X: 100000000
Y: -40000000
- X: 120000000
Y: -40000000
- - X: -160000000
Y: -60000000
- X: -170000000
Y: -60000000
- X: -170000000
Y: -30000000
- X: -190000000
Y: -30000000
- X: -190000000
Y: -90000000
- X: -160000000
Y: -90000000
- - X: 260000000
Y: -90000000
- X: 270000000
@@ -11644,18 +12026,6 @@ CompositeCollider2D:
Y: -150000000
- X: 260000000
Y: -150000000
- - X: -160000000
Y: -60000000
- X: -170000000
Y: -60000000
- X: -170000000
Y: -30000000
- X: -190000000
Y: -30000000
- X: -190000000
Y: -90000000
- X: -160000000
Y: -90000000
- - X: -210000000
Y: -50000000
- X: -250000000
@@ -11734,6 +12104,10 @@ CompositeCollider2D:
- {x: -0.000029300001, y: 10}
- {x: -4, y: 9.99997}
- {x: -3.999971, y: 8}
- - {x: 30.999971, y: 7}
- {x: 30.999971, y: 9}
- {x: 15, y: 8.99997}
- {x: 15.000029, y: 7}
- - {x: 6.9999704, y: 6}
- {x: 6.9999704, y: 8}
- {x: 3, y: 7.9999704}
@@ -11756,7 +12130,9 @@ CompositeCollider2D:
- {x: 4.000029, y: 2}
- - {x: 18.999971, y: -3}
- {x: 18.999971, y: 2}
- {x: 17, y: 1.9999708}
- {x: 15, y: 1.9999708}
- {x: 15.000029, y: 0}
- {x: 17, y: -0.0000294}
- {x: 17.000029, y: -3}
- - {x: 1.9999708, y: -7}
- {x: 1.9999708, y: 2}

View File

@@ -8,14 +8,9 @@ public class PlayerManager : MonoBehaviour
public static PlayerManager Instance;
public List<GameObject> players;
[SerializeField] private Vector2 spawnPosition;
[SerializeField] private InputActionAsset playerActions;
[Header("Debug")]
[SerializeField] private InputActionAsset player2Actions;
private PlayerCameraMovement playerCamera;
private Vector2 spawnPosition;
private void Awake()
{
@@ -26,8 +21,6 @@ public class PlayerManager : MonoBehaviour
{
GetComponent<PlayerInputManager>().onPlayerJoined += OnPlayerJoined;
GetComponent<PlayerInputManager>().onPlayerLeft += OnPlayerLeft;
playerCamera = FindFirstObjectByType<PlayerCameraMovement>();
}
private void OnPlayerJoined(PlayerInput playerInput)
@@ -53,6 +46,9 @@ public class PlayerManager : MonoBehaviour
else
{
print("A PlayerManager already exists.");
}
Destroy(this.gameObject);
}
spawnPosition = transform.position;
}
}