Fixed desync issue for PacMan moves
This commit is contained in:
@@ -1024,17 +1024,6 @@ GameObject:
|
|||||||
m_CorrespondingSourceObject: {fileID: 109330399196804403, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 109330399196804403, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
||||||
m_PrefabInstance: {fileID: 1210508488}
|
m_PrefabInstance: {fileID: 1210508488}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!114 &217059831 stripped
|
|
||||||
MonoBehaviour:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 7704679238063621622, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 1210508488}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 217059824}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 5ca6f74362dcf8a46b2ad3ec99e38719, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
--- !u!1 &219051897 stripped
|
--- !u!1 &219051897 stripped
|
||||||
GameObject:
|
GameObject:
|
||||||
m_CorrespondingSourceObject: {fileID: 7293350050207545893, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 7293350050207545893, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
||||||
@@ -4191,17 +4180,9 @@ MonoBehaviour:
|
|||||||
networkManager1: {fileID: 811840793}
|
networkManager1: {fileID: 811840793}
|
||||||
gridMovers1:
|
gridMovers1:
|
||||||
- {fileID: 63452443}
|
- {fileID: 63452443}
|
||||||
- {fileID: 1237257558}
|
|
||||||
- {fileID: 1910438138}
|
|
||||||
- {fileID: 1407423087}
|
|
||||||
- {fileID: 1541737191}
|
|
||||||
networkManager2: {fileID: 65516626}
|
networkManager2: {fileID: 65516626}
|
||||||
gridMovers2:
|
gridMovers2:
|
||||||
- {fileID: 1366842346}
|
- {fileID: 1366842346}
|
||||||
- {fileID: 1766929461}
|
|
||||||
- {fileID: 217059831}
|
|
||||||
- {fileID: 1205077370}
|
|
||||||
- {fileID: 1411581077}
|
|
||||||
debugImageToIndicateSynced: {fileID: 483106229}
|
debugImageToIndicateSynced: {fileID: 483106229}
|
||||||
--- !u!1 &805185634 stripped
|
--- !u!1 &805185634 stripped
|
||||||
GameObject:
|
GameObject:
|
||||||
@@ -6274,17 +6255,6 @@ GameObject:
|
|||||||
m_CorrespondingSourceObject: {fileID: 3694438210017678001, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3694438210017678001, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
||||||
m_PrefabInstance: {fileID: 1210508488}
|
m_PrefabInstance: {fileID: 1210508488}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!114 &1205077370 stripped
|
|
||||||
MonoBehaviour:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 6353919794372223604, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 1210508488}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1205077363}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 5ca6f74362dcf8a46b2ad3ec99e38719, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
--- !u!1001 &1210508488
|
--- !u!1001 &1210508488
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -7589,17 +7559,6 @@ GameObject:
|
|||||||
m_CorrespondingSourceObject: {fileID: 3576665465728788261, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3576665465728788261, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
||||||
m_PrefabInstance: {fileID: 1210508488}
|
m_PrefabInstance: {fileID: 1210508488}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!114 &1237257558 stripped
|
|
||||||
MonoBehaviour:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 2281557418868999653, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 7528894854307259292}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 384558790}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 5ca6f74362dcf8a46b2ad3ec99e38719, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
--- !u!1 &1245947246 stripped
|
--- !u!1 &1245947246 stripped
|
||||||
GameObject:
|
GameObject:
|
||||||
m_CorrespondingSourceObject: {fileID: 6377306495378490162, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 6377306495378490162, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
||||||
@@ -8074,17 +8033,6 @@ GameObject:
|
|||||||
m_CorrespondingSourceObject: {fileID: 3694438210017678001, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3694438210017678001, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
||||||
m_PrefabInstance: {fileID: 7528894854307259292}
|
m_PrefabInstance: {fileID: 7528894854307259292}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!114 &1407423087 stripped
|
|
||||||
MonoBehaviour:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 6353919794372223604, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 7528894854307259292}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1407423078}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 5ca6f74362dcf8a46b2ad3ec99e38719, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
--- !u!1 &1408697865 stripped
|
--- !u!1 &1408697865 stripped
|
||||||
GameObject:
|
GameObject:
|
||||||
m_CorrespondingSourceObject: {fileID: 6617131549196965745, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 6617131549196965745, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
||||||
@@ -8110,17 +8058,6 @@ GameObject:
|
|||||||
m_CorrespondingSourceObject: {fileID: 4054778616656183051, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 4054778616656183051, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
||||||
m_PrefabInstance: {fileID: 1210508488}
|
m_PrefabInstance: {fileID: 1210508488}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!114 &1411581077 stripped
|
|
||||||
MonoBehaviour:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 5993614020202909646, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 1210508488}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1411581070}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 5ca6f74362dcf8a46b2ad3ec99e38719, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
--- !u!1 &1418273771 stripped
|
--- !u!1 &1418273771 stripped
|
||||||
GameObject:
|
GameObject:
|
||||||
m_CorrespondingSourceObject: {fileID: 531603117301386236, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 531603117301386236, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
||||||
@@ -8839,17 +8776,6 @@ GameObject:
|
|||||||
m_CorrespondingSourceObject: {fileID: 355077758653607555, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 355077758653607555, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
||||||
m_PrefabInstance: {fileID: 7528894854307259292}
|
m_PrefabInstance: {fileID: 7528894854307259292}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!114 &1541737191 stripped
|
|
||||||
MonoBehaviour:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 5993614020202909646, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 7528894854307259292}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 262522556}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 5ca6f74362dcf8a46b2ad3ec99e38719, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
--- !u!1 &1551317024 stripped
|
--- !u!1 &1551317024 stripped
|
||||||
GameObject:
|
GameObject:
|
||||||
m_CorrespondingSourceObject: {fileID: 3556558624868497024, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3556558624868497024, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
||||||
@@ -11104,10 +11030,6 @@ MonoBehaviour:
|
|||||||
ID: 367
|
ID: 367
|
||||||
SerializedTypeNames:
|
SerializedTypeNames:
|
||||||
- VRC.Udon.UdonBehaviour
|
- VRC.Udon.UdonBehaviour
|
||||||
- gameObject: {fileID: 0}
|
|
||||||
ID: 368
|
|
||||||
SerializedTypeNames:
|
|
||||||
- VRC.Udon.UdonBehaviour
|
|
||||||
- gameObject: {fileID: 1377949919}
|
- gameObject: {fileID: 1377949919}
|
||||||
ID: 369
|
ID: 369
|
||||||
SerializedTypeNames:
|
SerializedTypeNames:
|
||||||
@@ -12133,17 +12055,6 @@ GameObject:
|
|||||||
m_CorrespondingSourceObject: {fileID: 8413102315728467232, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 8413102315728467232, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
||||||
m_PrefabInstance: {fileID: 1210508488}
|
m_PrefabInstance: {fileID: 1210508488}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!114 &1766929461 stripped
|
|
||||||
MonoBehaviour:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 2281557418868999653, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 1210508488}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1766929454}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 5ca6f74362dcf8a46b2ad3ec99e38719, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
--- !u!1 &1773753006 stripped
|
--- !u!1 &1773753006 stripped
|
||||||
GameObject:
|
GameObject:
|
||||||
m_CorrespondingSourceObject: {fileID: 7955628641985366373, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 7955628641985366373, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
||||||
@@ -12610,17 +12521,6 @@ GameObject:
|
|||||||
m_CorrespondingSourceObject: {fileID: 8799161989223030618, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 8799161989223030618, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
||||||
m_PrefabInstance: {fileID: 7528894854307259292}
|
m_PrefabInstance: {fileID: 7528894854307259292}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!114 &1910438138 stripped
|
|
||||||
MonoBehaviour:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 7704679238063621622, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 7528894854307259292}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1592985534}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 5ca6f74362dcf8a46b2ad3ec99e38719, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
--- !u!1 &1916414808 stripped
|
--- !u!1 &1916414808 stripped
|
||||||
GameObject:
|
GameObject:
|
||||||
m_CorrespondingSourceObject: {fileID: 3975383514799343505, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3975383514799343505, guid: 15ac0ed4c56c7784ea3ae9000fc2af1f, type: 3}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -50,9 +50,7 @@ namespace Marro.PacManUdon
|
|||||||
private Ghost blinky;
|
private Ghost blinky;
|
||||||
private ScoreBonusDisplay scoreBonusDisplay;
|
private ScoreBonusDisplay scoreBonusDisplay;
|
||||||
|
|
||||||
private Vector3 startPosition;
|
private Vector2 startPosition;
|
||||||
private Quaternion startRotation;
|
|
||||||
|
|
||||||
private Vector2 homePosition;
|
private Vector2 homePosition;
|
||||||
private Vector2 idlePosition1;
|
private Vector2 idlePosition1;
|
||||||
private Vector2 idlePosition2;
|
private Vector2 idlePosition2;
|
||||||
@@ -110,7 +108,6 @@ namespace Marro.PacManUdon
|
|||||||
scoreBonusDisplay = transform.Find("ScoreBonusDisplay").gameObject.GetComponent<ScoreBonusDisplay>();
|
scoreBonusDisplay = transform.Find("ScoreBonusDisplay").gameObject.GetComponent<ScoreBonusDisplay>();
|
||||||
scoreBonusDisplay.Initialize();
|
scoreBonusDisplay.Initialize();
|
||||||
startPosition = startTransform.localPosition;
|
startPosition = startTransform.localPosition;
|
||||||
startRotation = startTransform.localRotation;
|
|
||||||
|
|
||||||
frozenState = PacManGhostFrozenState.Frozen;
|
frozenState = PacManGhostFrozenState.Frozen;
|
||||||
|
|
||||||
@@ -124,7 +121,7 @@ namespace Marro.PacManUdon
|
|||||||
public void Reset()
|
public void Reset()
|
||||||
{
|
{
|
||||||
// Debug.Log($"{gameObject} Reset!");
|
// Debug.Log($"{gameObject} Reset!");
|
||||||
transform.SetLocalPositionAndRotation(startPosition, startRotation);
|
SetPosition(startPosition);
|
||||||
|
|
||||||
offGrid = true;
|
offGrid = true;
|
||||||
isScared = false;
|
isScared = false;
|
||||||
@@ -393,25 +390,26 @@ namespace Marro.PacManUdon
|
|||||||
default:
|
default:
|
||||||
return gridPosition;
|
return gridPosition;
|
||||||
case PacManGhostType.Blinky: // Chase PacMan directly
|
case PacManGhostType.Blinky: // Chase PacMan directly
|
||||||
return PositionToGrid(pacMan.transform.localPosition);
|
return PositionToGrid(pacMan.GetPosition());
|
||||||
case PacManGhostType.Pinky: // Try to get ahead of PacMan
|
case PacManGhostType.Pinky: // Try to get ahead of PacMan
|
||||||
return GetTargetAheadOfPacMan(4);
|
return GetTargetAheadOfPacMan(4);
|
||||||
case PacManGhostType.Inky: // Try to attack from the opposite side of Blinky
|
case PacManGhostType.Inky: // Try to attack from the opposite side of Blinky
|
||||||
var blinkyPosition = PositionToGrid(blinky.transform.localPosition);
|
var blinkyPosition = PositionToGrid(blinky.GetPosition());
|
||||||
return ((GetTargetAheadOfPacMan(2) - blinkyPosition) * 2) + blinkyPosition;
|
return ((GetTargetAheadOfPacMan(2) - blinkyPosition) * 2) + blinkyPosition;
|
||||||
case PacManGhostType.Clyde: // Chase PacMan, but retreat to corner if PacMan gets to close
|
case PacManGhostType.Clyde: // Chase PacMan, but retreat to corner if PacMan gets to close
|
||||||
if (Vector2.Distance(gridPosition, PositionToGrid(pacMan.transform.localPosition)) < 8)
|
var pacManPosition = PositionToGrid(pacMan.GetPosition());
|
||||||
|
if (Vector2.Distance(gridPosition, pacManPosition) < 8)
|
||||||
{
|
{
|
||||||
return cornerPosition;
|
return cornerPosition;
|
||||||
}
|
}
|
||||||
return PositionToGrid(pacMan.transform.localPosition);
|
return pacManPosition;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Vector2 GetTargetAheadOfPacMan(int tilesInFront)
|
private Vector2 GetTargetAheadOfPacMan(int tilesInFront)
|
||||||
{
|
{
|
||||||
var direction = pacMan.GetTargetDirection();
|
var direction = pacMan.GetTargetDirection();
|
||||||
var result = PositionToGrid(pacMan.transform.localPosition) + directionVectors[(int)direction] * tilesInFront;
|
var result = PositionToGrid(pacMan.GetPosition()) + directionVectors[(int)direction] * tilesInFront;
|
||||||
|
|
||||||
if (direction == Direction.Up) // Reproducing a bug in the original game
|
if (direction == Direction.Up) // Reproducing a bug in the original game
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,10 +17,11 @@ namespace Marro.PacManUdon
|
|||||||
|
|
||||||
public abstract class GridMover : SyncedObject
|
public abstract class GridMover : SyncedObject
|
||||||
{
|
{
|
||||||
|
protected Vector2 position;
|
||||||
protected Direction direction;
|
protected Direction direction;
|
||||||
protected Direction targetDirection;
|
protected Direction targetDirection;
|
||||||
|
|
||||||
// Cannot be static, much to my annoyance
|
// Cannot be static
|
||||||
public readonly Vector2[] directionVectors =
|
public readonly Vector2[] directionVectors =
|
||||||
{
|
{
|
||||||
Vector2.zero, // 0
|
Vector2.zero, // 0
|
||||||
@@ -43,11 +44,13 @@ namespace Marro.PacManUdon
|
|||||||
|
|
||||||
public virtual Vector2 GetPosition()
|
public virtual Vector2 GetPosition()
|
||||||
{
|
{
|
||||||
return (Vector2)transform.localPosition;
|
//return (Vector2)transform.localPosition;
|
||||||
|
return position;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SetPosition(Vector2 position)
|
public virtual void SetPosition(Vector2 position)
|
||||||
{
|
{
|
||||||
|
this.position = position;
|
||||||
transform.localPosition = new Vector3(position.x, position.y, transform.localPosition.z);
|
transform.localPosition = new Vector3(position.x, position.y, transform.localPosition.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1103,11 +1103,6 @@ namespace Marro.PacManUdon
|
|||||||
Array.Copy(data, start, result, 0, length);
|
Array.Copy(data, start, result, 0, length);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static float RoundDown(float value, float precision)
|
|
||||||
{
|
|
||||||
return (float)(Math.Floor(value / precision) * precision);
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region SyncedData
|
#region SyncedData
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 24
|
Data: 23
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data:
|
Data:
|
||||||
@@ -109,16 +109,70 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: direction
|
Data: position
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: direction
|
Data: position
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 7|System.RuntimeType, mscorlib
|
Data: 7|System.RuntimeType, mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 1
|
||||||
|
Data: UnityEngine.Vector2, UnityEngine.CoreModule
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name: <SystemType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 7
|
||||||
|
- Name: <SyncMode>k__BackingField
|
||||||
|
Entry: 7
|
||||||
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 6
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name: <IsSerialized>k__BackingField
|
||||||
|
Entry: 5
|
||||||
|
Data: false
|
||||||
|
- Name: _fieldAttributes
|
||||||
|
Entry: 7
|
||||||
|
Data: 8|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 12
|
||||||
|
Data: 0
|
||||||
|
- Name:
|
||||||
|
Entry: 13
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 7
|
||||||
|
Data:
|
||||||
|
- Name: $k
|
||||||
|
Entry: 1
|
||||||
|
Data: direction
|
||||||
|
- Name: $v
|
||||||
|
Entry: 7
|
||||||
|
Data: 9|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
|
- Name: <Name>k__BackingField
|
||||||
|
Entry: 1
|
||||||
|
Data: direction
|
||||||
|
- Name: <UserType>k__BackingField
|
||||||
|
Entry: 7
|
||||||
|
Data: 10|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: Marro.PacManUdon.Direction, Assembly-CSharp
|
Data: Marro.PacManUdon.Direction, Assembly-CSharp
|
||||||
@@ -127,7 +181,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 8|System.RuntimeType, mscorlib
|
Data: 11|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: System.Int32, mscorlib
|
Data: System.Int32, mscorlib
|
||||||
@@ -148,7 +202,7 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 9|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 12|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
@@ -172,70 +226,16 @@ MonoBehaviour:
|
|||||||
Data: targetDirection
|
Data: targetDirection
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 10|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 13|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: targetDirection
|
Data: targetDirection
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 7
|
Data: 10
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 8
|
Data: 11
|
||||||
- Name: <SyncMode>k__BackingField
|
|
||||||
Entry: 7
|
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 6
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: <IsSerialized>k__BackingField
|
|
||||||
Entry: 5
|
|
||||||
Data: false
|
|
||||||
- Name: _fieldAttributes
|
|
||||||
Entry: 7
|
|
||||||
Data: 11|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 12
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 13
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 7
|
|
||||||
Data:
|
|
||||||
- Name: $k
|
|
||||||
Entry: 1
|
|
||||||
Data: directionVectors
|
|
||||||
- Name: $v
|
|
||||||
Entry: 7
|
|
||||||
Data: 12|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
|
||||||
- Name: <Name>k__BackingField
|
|
||||||
Entry: 1
|
|
||||||
Data: directionVectors
|
|
||||||
- Name: <UserType>k__BackingField
|
|
||||||
Entry: 7
|
|
||||||
Data: 13|System.RuntimeType, mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 1
|
|
||||||
Data: UnityEngine.Vector2[], UnityEngine.CoreModule
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: <SystemType>k__BackingField
|
|
||||||
Entry: 9
|
|
||||||
Data: 13
|
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -271,25 +271,25 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: gameManager
|
Data: directionVectors
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 15|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 15|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: gameManager
|
Data: directionVectors
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 16|System.RuntimeType, mscorlib
|
Data: 16|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: Marro.PacManUdon.GameManager, Assembly-CSharp
|
Data: UnityEngine.Vector2[], UnityEngine.CoreModule
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 4
|
Data: 16
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -591,17 +591,11 @@ MonoBehaviour:
|
|||||||
Entry: 1
|
Entry: 1
|
||||||
Data: startPosition
|
Data: startPosition
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 9
|
||||||
Data: 32|System.RuntimeType, mscorlib
|
Data: 7
|
||||||
- Name:
|
|
||||||
Entry: 1
|
|
||||||
Data: UnityEngine.Vector3, UnityEngine.CoreModule
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 32
|
Data: 7
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -616,61 +610,7 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 33|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 32|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
|
||||||
Entry: 12
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 13
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 7
|
|
||||||
Data:
|
|
||||||
- Name: $k
|
|
||||||
Entry: 1
|
|
||||||
Data: startRotation
|
|
||||||
- Name: $v
|
|
||||||
Entry: 7
|
|
||||||
Data: 34|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
|
||||||
- Name: <Name>k__BackingField
|
|
||||||
Entry: 1
|
|
||||||
Data: startRotation
|
|
||||||
- Name: <UserType>k__BackingField
|
|
||||||
Entry: 7
|
|
||||||
Data: 35|System.RuntimeType, mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 1
|
|
||||||
Data: UnityEngine.Quaternion, UnityEngine.CoreModule
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: <SystemType>k__BackingField
|
|
||||||
Entry: 9
|
|
||||||
Data: 35
|
|
||||||
- Name: <SyncMode>k__BackingField
|
|
||||||
Entry: 7
|
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 6
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: <IsSerialized>k__BackingField
|
|
||||||
Entry: 5
|
|
||||||
Data: false
|
|
||||||
- Name: _fieldAttributes
|
|
||||||
Entry: 7
|
|
||||||
Data: 36|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
@@ -694,13 +634,13 @@ MonoBehaviour:
|
|||||||
Data: animator
|
Data: animator
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 37|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 33|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: animator
|
Data: animator
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 38|System.RuntimeType, mscorlib
|
Data: 34|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: UnityEngine.Animator, UnityEngine.AnimationModule
|
Data: UnityEngine.Animator, UnityEngine.AnimationModule
|
||||||
@@ -709,7 +649,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 38
|
Data: 34
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -724,7 +664,7 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 39|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 35|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
@@ -748,13 +688,13 @@ MonoBehaviour:
|
|||||||
Data: renderer
|
Data: renderer
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 40|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 36|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: renderer
|
Data: renderer
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 41|System.RuntimeType, mscorlib
|
Data: 37|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: UnityEngine.Renderer, UnityEngine.CoreModule
|
Data: UnityEngine.Renderer, UnityEngine.CoreModule
|
||||||
@@ -763,7 +703,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 41
|
Data: 37
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -778,7 +718,7 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 42|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 38|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
@@ -802,13 +742,13 @@ MonoBehaviour:
|
|||||||
Data: hideUntilUnfrozen
|
Data: hideUntilUnfrozen
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 43|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 39|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: hideUntilUnfrozen
|
Data: hideUntilUnfrozen
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 44|System.RuntimeType, mscorlib
|
Data: 40|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: System.Boolean, mscorlib
|
Data: System.Boolean, mscorlib
|
||||||
@@ -817,7 +757,103 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 44
|
Data: 40
|
||||||
|
- Name: <SyncMode>k__BackingField
|
||||||
|
Entry: 7
|
||||||
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 6
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name: <IsSerialized>k__BackingField
|
||||||
|
Entry: 5
|
||||||
|
Data: false
|
||||||
|
- Name: _fieldAttributes
|
||||||
|
Entry: 7
|
||||||
|
Data: 41|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 12
|
||||||
|
Data: 0
|
||||||
|
- Name:
|
||||||
|
Entry: 13
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 7
|
||||||
|
Data:
|
||||||
|
- Name: $k
|
||||||
|
Entry: 1
|
||||||
|
Data: dead
|
||||||
|
- Name: $v
|
||||||
|
Entry: 7
|
||||||
|
Data: 42|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
|
- Name: <Name>k__BackingField
|
||||||
|
Entry: 1
|
||||||
|
Data: dead
|
||||||
|
- Name: <UserType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 40
|
||||||
|
- Name: <SystemType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 40
|
||||||
|
- Name: <SyncMode>k__BackingField
|
||||||
|
Entry: 7
|
||||||
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 6
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name: <IsSerialized>k__BackingField
|
||||||
|
Entry: 5
|
||||||
|
Data: false
|
||||||
|
- Name: _fieldAttributes
|
||||||
|
Entry: 7
|
||||||
|
Data: 43|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 12
|
||||||
|
Data: 0
|
||||||
|
- Name:
|
||||||
|
Entry: 13
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 7
|
||||||
|
Data:
|
||||||
|
- Name: $k
|
||||||
|
Entry: 1
|
||||||
|
Data: kinematic
|
||||||
|
- Name: $v
|
||||||
|
Entry: 7
|
||||||
|
Data: 44|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
|
- Name: <Name>k__BackingField
|
||||||
|
Entry: 1
|
||||||
|
Data: kinematic
|
||||||
|
- Name: <UserType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 40
|
||||||
|
- Name: <SystemType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 40
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -853,19 +889,19 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: dead
|
Data: followingPredefinedPath
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 46|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 46|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: dead
|
Data: followingPredefinedPath
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 44
|
Data: 40
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 44
|
Data: 40
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -901,67 +937,31 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: kinematic
|
Data: predefinedPath
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 48|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 48|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: kinematic
|
Data: predefinedPath
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 9
|
|
||||||
Data: 44
|
|
||||||
- Name: <SystemType>k__BackingField
|
|
||||||
Entry: 9
|
|
||||||
Data: 44
|
|
||||||
- Name: <SyncMode>k__BackingField
|
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: 49|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 6
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: <IsSerialized>k__BackingField
|
|
||||||
Entry: 5
|
|
||||||
Data: false
|
|
||||||
- Name: _fieldAttributes
|
|
||||||
Entry: 7
|
|
||||||
Data: 49|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 12
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 13
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 7
|
|
||||||
Data:
|
|
||||||
- Name: $k
|
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: followingPredefinedPath
|
Data: Marro.PacManUdon.Direction[], Assembly-CSharp
|
||||||
- Name: $v
|
- Name:
|
||||||
Entry: 7
|
Entry: 8
|
||||||
Data: 50|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data:
|
||||||
- Name: <Name>k__BackingField
|
|
||||||
Entry: 1
|
|
||||||
Data: followingPredefinedPath
|
|
||||||
- Name: <UserType>k__BackingField
|
|
||||||
Entry: 9
|
|
||||||
Data: 44
|
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 7
|
||||||
Data: 44
|
Data: 50|System.RuntimeType, mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 1
|
||||||
|
Data: System.Int32[], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -997,31 +997,67 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: predefinedPath
|
Data: predefinedPathIndex
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 52|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 52|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: predefinedPath
|
Data: predefinedPathIndex
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 9
|
||||||
Data: 53|System.RuntimeType, mscorlib
|
Data: 11
|
||||||
- Name:
|
|
||||||
Entry: 1
|
|
||||||
Data: Marro.PacManUdon.Direction[], Assembly-CSharp
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 11
|
||||||
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 54|System.RuntimeType, mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 6
|
||||||
Data: System.Int32[], mscorlib
|
Data:
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
|
- Name: <IsSerialized>k__BackingField
|
||||||
|
Entry: 5
|
||||||
|
Data: false
|
||||||
|
- Name: _fieldAttributes
|
||||||
|
Entry: 7
|
||||||
|
Data: 53|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 12
|
||||||
|
Data: 0
|
||||||
|
- Name:
|
||||||
|
Entry: 13
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 7
|
||||||
|
Data:
|
||||||
|
- Name: $k
|
||||||
|
Entry: 1
|
||||||
|
Data: freezeSeconds
|
||||||
|
- Name: $v
|
||||||
|
Entry: 7
|
||||||
|
Data: 54|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
|
- Name: <Name>k__BackingField
|
||||||
|
Entry: 1
|
||||||
|
Data: freezeSeconds
|
||||||
|
- Name: <UserType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 25
|
||||||
|
- Name: <SystemType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 25
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -1057,19 +1093,19 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: predefinedPathIndex
|
Data: frozen
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 56|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 56|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: predefinedPathIndex
|
Data: frozen
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 8
|
Data: 40
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 8
|
Data: 40
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -1105,19 +1141,19 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: freezeSeconds
|
Data: animatorKeyState
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 58|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 58|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: freezeSeconds
|
Data: animatorKeyState
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 25
|
Data: 11
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 25
|
Data: 11
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -1153,19 +1189,19 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: frozen
|
Data: animatorKeyDirection
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 60|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 60|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: frozen
|
Data: animatorKeyDirection
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 44
|
Data: 11
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 44
|
Data: 11
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -1196,102 +1232,6 @@ MonoBehaviour:
|
|||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
- Name:
|
|
||||||
Entry: 7
|
|
||||||
Data:
|
|
||||||
- Name: $k
|
|
||||||
Entry: 1
|
|
||||||
Data: animatorKeyState
|
|
||||||
- Name: $v
|
|
||||||
Entry: 7
|
|
||||||
Data: 62|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
|
||||||
- Name: <Name>k__BackingField
|
|
||||||
Entry: 1
|
|
||||||
Data: animatorKeyState
|
|
||||||
- Name: <UserType>k__BackingField
|
|
||||||
Entry: 9
|
|
||||||
Data: 8
|
|
||||||
- Name: <SystemType>k__BackingField
|
|
||||||
Entry: 9
|
|
||||||
Data: 8
|
|
||||||
- Name: <SyncMode>k__BackingField
|
|
||||||
Entry: 7
|
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 6
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: <IsSerialized>k__BackingField
|
|
||||||
Entry: 5
|
|
||||||
Data: false
|
|
||||||
- Name: _fieldAttributes
|
|
||||||
Entry: 7
|
|
||||||
Data: 63|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 12
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 13
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 7
|
|
||||||
Data:
|
|
||||||
- Name: $k
|
|
||||||
Entry: 1
|
|
||||||
Data: animatorKeyDirection
|
|
||||||
- Name: $v
|
|
||||||
Entry: 7
|
|
||||||
Data: 64|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
|
||||||
- Name: <Name>k__BackingField
|
|
||||||
Entry: 1
|
|
||||||
Data: animatorKeyDirection
|
|
||||||
- Name: <UserType>k__BackingField
|
|
||||||
Entry: 9
|
|
||||||
Data: 8
|
|
||||||
- Name: <SystemType>k__BackingField
|
|
||||||
Entry: 9
|
|
||||||
Data: 8
|
|
||||||
- Name: <SyncMode>k__BackingField
|
|
||||||
Entry: 7
|
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 6
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: <IsSerialized>k__BackingField
|
|
||||||
Entry: 5
|
|
||||||
Data: false
|
|
||||||
- Name: _fieldAttributes
|
|
||||||
Entry: 7
|
|
||||||
Data: 65|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 12
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 13
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 13
|
Entry: 13
|
||||||
Data:
|
Data:
|
||||||
|
|||||||
@@ -16,14 +16,12 @@ namespace Marro.PacManUdon
|
|||||||
[RequireComponent(typeof(Renderer))]
|
[RequireComponent(typeof(Renderer))]
|
||||||
public class PacMan : GridMover
|
public class PacMan : GridMover
|
||||||
{
|
{
|
||||||
private GameManager gameManager;
|
|
||||||
private PlayerInput input;
|
private PlayerInput input;
|
||||||
private CollisionManager collisionManager;
|
private CollisionManager collisionManager;
|
||||||
private float defaultSpeed;
|
private float defaultSpeed;
|
||||||
private float powerPelletSpeed;
|
private float powerPelletSpeed;
|
||||||
private float speed;
|
private float speed;
|
||||||
private Vector3 startPosition;
|
private Vector2 startPosition;
|
||||||
private Quaternion startRotation;
|
|
||||||
private Animator animator;
|
private Animator animator;
|
||||||
new Renderer renderer;
|
new Renderer renderer;
|
||||||
private bool hideUntilUnfrozen;
|
private bool hideUntilUnfrozen;
|
||||||
@@ -37,15 +35,11 @@ namespace Marro.PacManUdon
|
|||||||
private float freezeSeconds;
|
private float freezeSeconds;
|
||||||
private bool frozen;
|
private bool frozen;
|
||||||
|
|
||||||
#region Animator constants
|
|
||||||
private readonly int animatorKeyState = Animator.StringToHash("State");
|
private readonly int animatorKeyState = Animator.StringToHash("State");
|
||||||
private readonly int animatorKeyDirection = Animator.StringToHash("Direction");
|
private readonly int animatorKeyDirection = Animator.StringToHash("Direction");
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
public void Initialize(PlayerInput input, Transform startTransform, GameManager gameManager, CollisionManager collisionManager)
|
public void Initialize(PlayerInput input, Transform startTransform, GameManager gameManager, CollisionManager collisionManager)
|
||||||
{
|
{
|
||||||
this.gameManager = gameManager;
|
|
||||||
this.collisionManager = collisionManager;
|
this.collisionManager = collisionManager;
|
||||||
this.input = input;
|
this.input = input;
|
||||||
animator = GetComponent<Animator>();
|
animator = GetComponent<Animator>();
|
||||||
@@ -53,14 +47,11 @@ namespace Marro.PacManUdon
|
|||||||
frozen = false;
|
frozen = false;
|
||||||
hideUntilUnfrozen = false;
|
hideUntilUnfrozen = false;
|
||||||
startPosition = startTransform.localPosition;
|
startPosition = startTransform.localPosition;
|
||||||
startRotation = startTransform.localRotation;
|
|
||||||
|
|
||||||
SubscribeToEvent(NetworkEventType.PacManTurn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Reset()
|
public void Reset()
|
||||||
{
|
{
|
||||||
transform.SetLocalPositionAndRotation(startPosition, startRotation);
|
SetPosition(startPosition);
|
||||||
direction = Direction.Left;
|
direction = Direction.Left;
|
||||||
targetDirection = Direction.Left;
|
targetDirection = Direction.Left;
|
||||||
speed = defaultSpeed;
|
speed = defaultSpeed;
|
||||||
@@ -95,11 +86,14 @@ namespace Marro.PacManUdon
|
|||||||
{
|
{
|
||||||
freezeSeconds -= networkManager.SyncedDeltaTime;
|
freezeSeconds -= networkManager.SyncedDeltaTime;
|
||||||
animator.speed = 0;
|
animator.speed = 0;
|
||||||
return;
|
speed = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
speed *= 1 - freezePart;
|
||||||
|
animator.speed = 1 - freezePart;
|
||||||
|
freezeSeconds = 0;
|
||||||
}
|
}
|
||||||
speed *= 1 - freezePart;
|
|
||||||
animator.speed = 1 - freezePart;
|
|
||||||
freezeSeconds = 0;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -163,11 +157,6 @@ namespace Marro.PacManUdon
|
|||||||
SetDirection((Direction)((int)inputDirection | (int)directionToCenter));
|
SetDirection((Direction)((int)inputDirection | (int)directionToCenter));
|
||||||
}
|
}
|
||||||
SetTargetDirection(inputDirection); // This is the direction most logic should assume pacman is moving, the actual direction may be different due to cornering
|
SetTargetDirection(inputDirection); // This is the direction most logic should assume pacman is moving, the actual direction may be different due to cornering
|
||||||
|
|
||||||
if (!followingPredefinedPath)
|
|
||||||
{
|
|
||||||
networkManager.SendEventSoon(NetworkEventType.PacManTurn);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nextPosition;
|
return nextPosition;
|
||||||
@@ -221,7 +210,7 @@ namespace Marro.PacManUdon
|
|||||||
}
|
}
|
||||||
else if (eatResult == EatResult.PowerPellet)
|
else if (eatResult == EatResult.PowerPellet)
|
||||||
{
|
{
|
||||||
freezeSeconds = freezeSeconds = 0.05f;
|
freezeSeconds = 0.05f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,43 +319,5 @@ namespace Marro.PacManUdon
|
|||||||
{
|
{
|
||||||
renderer.enabled = visible;
|
renderer.enabled = visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void CollectSyncedData(byte[] data, ref int index, NetworkEventType eventType)
|
|
||||||
{
|
|
||||||
if (eventType != NetworkEventType.PacManTurn)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (kinematic || frozen || !enabled)
|
|
||||||
{
|
|
||||||
index += 1;
|
|
||||||
PadSyncedData(ref index);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
data.AppendAsByte((int)targetDirection, ref index);
|
|
||||||
|
|
||||||
base.CollectSyncedData(data, ref index, eventType);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool WriteSyncedData(byte[] data, ref int index, NetworkEventType eventType)
|
|
||||||
{
|
|
||||||
if (eventType != NetworkEventType.PacManTurn)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (kinematic || frozen || !enabled)
|
|
||||||
{
|
|
||||||
index += 1;
|
|
||||||
PadSyncedData(ref index);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
SetTargetDirection((Direction)data.ReadByte(ref index));
|
|
||||||
|
|
||||||
return base.WriteSyncedData(data, ref index, eventType);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -43,31 +43,37 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 8
|
Data: 10
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: active
|
Data: networkManager
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: active
|
Data: networkManager
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 3|System.RuntimeType, mscorlib
|
Data: 3|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: System.Boolean, mscorlib
|
Data: Marro.PacManUdon.NetworkManager, Assembly-CSharp
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 7
|
||||||
Data: 3
|
Data: 4|System.RuntimeType, mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 1
|
||||||
|
Data: VRC.Udon.UdonBehaviour, VRC.Udon
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -82,7 +88,7 @@ MonoBehaviour:
|
|||||||
Data: true
|
Data: true
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 5|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
@@ -103,31 +109,25 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: gameManager
|
Data: active
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 5|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: gameManager
|
Data: active
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
|
||||||
Data: 6|System.RuntimeType, mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 1
|
|
||||||
Data: Marro.PacManUdon.GameManager, Assembly-CSharp
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: <SystemType>k__BackingField
|
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 7|System.RuntimeType, mscorlib
|
Data: 7|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: VRC.Udon.UdonBehaviour, VRC.Udon
|
Data: System.Boolean, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
|
- Name: <SystemType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 7
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -139,7 +139,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: <IsSerialized>k__BackingField
|
- Name: <IsSerialized>k__BackingField
|
||||||
Entry: 5
|
Entry: 5
|
||||||
Data: false
|
Data: true
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 8|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 8|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
@@ -163,16 +163,70 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: inputHorizontal
|
Data: gameManager
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 9|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 9|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: inputHorizontal
|
Data: gameManager
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 10|System.RuntimeType, mscorlib
|
Data: 10|System.RuntimeType, mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 1
|
||||||
|
Data: Marro.PacManUdon.GameManager, Assembly-CSharp
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name: <SystemType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 4
|
||||||
|
- Name: <SyncMode>k__BackingField
|
||||||
|
Entry: 7
|
||||||
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 6
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name: <IsSerialized>k__BackingField
|
||||||
|
Entry: 5
|
||||||
|
Data: false
|
||||||
|
- Name: _fieldAttributes
|
||||||
|
Entry: 7
|
||||||
|
Data: 11|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 12
|
||||||
|
Data: 0
|
||||||
|
- Name:
|
||||||
|
Entry: 13
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 7
|
||||||
|
Data:
|
||||||
|
- Name: $k
|
||||||
|
Entry: 1
|
||||||
|
Data: resultInput
|
||||||
|
- Name: $v
|
||||||
|
Entry: 7
|
||||||
|
Data: 12|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
|
- Name: <Name>k__BackingField
|
||||||
|
Entry: 1
|
||||||
|
Data: resultInput
|
||||||
|
- Name: <UserType>k__BackingField
|
||||||
|
Entry: 7
|
||||||
|
Data: 13|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: Marro.PacManUdon.Direction, Assembly-CSharp
|
Data: Marro.PacManUdon.Direction, Assembly-CSharp
|
||||||
@@ -181,7 +235,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 11|System.RuntimeType, mscorlib
|
Data: 14|System.RuntimeType, mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: System.Int32, mscorlib
|
Data: System.Int32, mscorlib
|
||||||
@@ -202,7 +256,7 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 12|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 15|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
@@ -223,73 +277,19 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: inputVertical
|
Data: inputHorizontal
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 13|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 16|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: inputVertical
|
Data: inputHorizontal
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 10
|
Data: 13
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 11
|
Data: 14
|
||||||
- Name: <SyncMode>k__BackingField
|
|
||||||
Entry: 7
|
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 6
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: <IsSerialized>k__BackingField
|
|
||||||
Entry: 5
|
|
||||||
Data: false
|
|
||||||
- Name: _fieldAttributes
|
|
||||||
Entry: 7
|
|
||||||
Data: 14|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 12
|
|
||||||
Data: 0
|
|
||||||
- Name:
|
|
||||||
Entry: 13
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name:
|
|
||||||
Entry: 7
|
|
||||||
Data:
|
|
||||||
- Name: $k
|
|
||||||
Entry: 1
|
|
||||||
Data: horizontalValue
|
|
||||||
- Name: $v
|
|
||||||
Entry: 7
|
|
||||||
Data: 15|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
|
||||||
- Name: <Name>k__BackingField
|
|
||||||
Entry: 1
|
|
||||||
Data: horizontalValue
|
|
||||||
- Name: <UserType>k__BackingField
|
|
||||||
Entry: 7
|
|
||||||
Data: 16|System.RuntimeType, mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 1
|
|
||||||
Data: System.Single, mscorlib
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: <SystemType>k__BackingField
|
|
||||||
Entry: 9
|
|
||||||
Data: 16
|
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -325,19 +325,19 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: verticalValue
|
Data: inputVertical
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 18|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 18|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: verticalValue
|
Data: inputVertical
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 16
|
Data: 13
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 16
|
Data: 14
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -373,19 +373,25 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: horizontalPriority
|
Data: horizontalValue
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 20|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 20|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: horizontalPriority
|
Data: horizontalValue
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 9
|
Entry: 7
|
||||||
Data: 3
|
Data: 21|System.RuntimeType, mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 1
|
||||||
|
Data: System.Single, mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 3
|
Data: 21
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -400,7 +406,7 @@ MonoBehaviour:
|
|||||||
Data: false
|
Data: false
|
||||||
- Name: _fieldAttributes
|
- Name: _fieldAttributes
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 21|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
Data: 22|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 0
|
Data: 0
|
||||||
@@ -421,25 +427,19 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: player
|
Data: verticalValue
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 22|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 23|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: player
|
Data: verticalValue
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 7
|
Entry: 9
|
||||||
Data: 23|System.RuntimeType, mscorlib
|
Data: 21
|
||||||
- Name:
|
|
||||||
Entry: 1
|
|
||||||
Data: VRC.SDKBase.VRCPlayerApi, VRCSDKBase
|
|
||||||
- Name:
|
|
||||||
Entry: 8
|
|
||||||
Data:
|
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 23
|
Data: 21
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@@ -470,6 +470,108 @@ MonoBehaviour:
|
|||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 7
|
||||||
|
Data:
|
||||||
|
- Name: $k
|
||||||
|
Entry: 1
|
||||||
|
Data: horizontalPriority
|
||||||
|
- Name: $v
|
||||||
|
Entry: 7
|
||||||
|
Data: 25|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
|
- Name: <Name>k__BackingField
|
||||||
|
Entry: 1
|
||||||
|
Data: horizontalPriority
|
||||||
|
- Name: <UserType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 7
|
||||||
|
- Name: <SystemType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 7
|
||||||
|
- Name: <SyncMode>k__BackingField
|
||||||
|
Entry: 7
|
||||||
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 6
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name: <IsSerialized>k__BackingField
|
||||||
|
Entry: 5
|
||||||
|
Data: false
|
||||||
|
- Name: _fieldAttributes
|
||||||
|
Entry: 7
|
||||||
|
Data: 26|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 12
|
||||||
|
Data: 0
|
||||||
|
- Name:
|
||||||
|
Entry: 13
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 7
|
||||||
|
Data:
|
||||||
|
- Name: $k
|
||||||
|
Entry: 1
|
||||||
|
Data: player
|
||||||
|
- Name: $v
|
||||||
|
Entry: 7
|
||||||
|
Data: 27|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
|
- Name: <Name>k__BackingField
|
||||||
|
Entry: 1
|
||||||
|
Data: player
|
||||||
|
- Name: <UserType>k__BackingField
|
||||||
|
Entry: 7
|
||||||
|
Data: 28|System.RuntimeType, mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 1
|
||||||
|
Data: VRC.SDKBase.VRCPlayerApi, VRCSDKBase
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name: <SystemType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 28
|
||||||
|
- Name: <SyncMode>k__BackingField
|
||||||
|
Entry: 7
|
||||||
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 6
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name: <IsSerialized>k__BackingField
|
||||||
|
Entry: 5
|
||||||
|
Data: false
|
||||||
|
- Name: _fieldAttributes
|
||||||
|
Entry: 7
|
||||||
|
Data: 29|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 12
|
||||||
|
Data: 0
|
||||||
|
- Name:
|
||||||
|
Entry: 13
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 13
|
Entry: 13
|
||||||
Data:
|
Data:
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
namespace Marro.PacManUdon
|
namespace Marro.PacManUdon
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
using UdonSharp;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using VRC.SDKBase;
|
using VRC.SDKBase;
|
||||||
using VRC.Udon.Common;
|
using VRC.Udon.Common;
|
||||||
|
|
||||||
public class PlayerInput : UdonSharpBehaviour
|
public class PlayerInput : SyncedObject
|
||||||
{
|
{
|
||||||
public bool active;
|
public bool active;
|
||||||
private GameManager gameManager;
|
private GameManager gameManager;
|
||||||
|
Direction resultInput;
|
||||||
Direction inputHorizontal;
|
Direction inputHorizontal;
|
||||||
Direction inputVertical;
|
Direction inputVertical;
|
||||||
float horizontalValue;
|
float horizontalValue;
|
||||||
@@ -20,10 +20,13 @@
|
|||||||
public void Initialize(GameManager gameManager)
|
public void Initialize(GameManager gameManager)
|
||||||
{
|
{
|
||||||
this.gameManager = gameManager;
|
this.gameManager = gameManager;
|
||||||
|
resultInput = Direction.Zero;
|
||||||
inputHorizontal = Direction.Zero;
|
inputHorizontal = Direction.Zero;
|
||||||
inputVertical = Direction.Zero;
|
inputVertical = Direction.Zero;
|
||||||
horizontalPriority = false;
|
horizontalPriority = false;
|
||||||
player = Networking.LocalPlayer;
|
player = Networking.LocalPlayer;
|
||||||
|
|
||||||
|
SubscribeToEvent(NetworkEventType.PacManTurn);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Activate()
|
public void Activate()
|
||||||
@@ -67,6 +70,9 @@
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var previousInputHorizontal = inputHorizontal;
|
||||||
|
|
||||||
horizontalValue = Math.Abs(value);
|
horizontalValue = Math.Abs(value);
|
||||||
if (value < -0.5)
|
if (value < -0.5)
|
||||||
{
|
{
|
||||||
@@ -90,6 +96,10 @@
|
|||||||
SetPriority(false);
|
SetPriority(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (previousInputHorizontal != inputHorizontal)
|
||||||
|
{
|
||||||
|
UpdateResultInput();
|
||||||
|
}
|
||||||
// Debug.Log("Horizontal Input Event: " + value + " | Direction: " + direction + " | lastDirection: " + lastDirection + " | Left: " + left + " | Right: " + right);
|
// Debug.Log("Horizontal Input Event: " + value + " | Direction: " + direction + " | lastDirection: " + lastDirection + " | Left: " + left + " | Right: " + right);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,6 +109,9 @@
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var previousInputVertical = inputVertical;
|
||||||
|
|
||||||
verticalValue = Math.Abs(value);
|
verticalValue = Math.Abs(value);
|
||||||
if (value > 0.5)
|
if (value > 0.5)
|
||||||
{
|
{
|
||||||
@@ -122,6 +135,11 @@
|
|||||||
SetPriority(true);
|
SetPriority(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (previousInputVertical != inputVertical)
|
||||||
|
{
|
||||||
|
UpdateResultInput();
|
||||||
|
}
|
||||||
|
|
||||||
// Debug.Log("Vertical Input Event: " + value + " | Direction: " + direction + " | lastDirection : " + lastDirection);
|
// Debug.Log("Vertical Input Event: " + value + " | Direction: " + direction + " | lastDirection : " + lastDirection);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,16 +152,37 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UpdateResultInput()
|
||||||
|
{
|
||||||
|
resultInput = horizontalPriority ? inputHorizontal : inputVertical;
|
||||||
|
networkManager.SendEventSoon(NetworkEventType.PacManTurn);
|
||||||
|
}
|
||||||
|
|
||||||
public Direction GetDirection()
|
public Direction GetDirection()
|
||||||
{
|
{
|
||||||
if (horizontalPriority)
|
return resultInput;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void CollectSyncedData(byte[] data, ref int index, NetworkEventType eventType)
|
||||||
|
{
|
||||||
|
if (eventType != NetworkEventType.PacManTurn)
|
||||||
{
|
{
|
||||||
return inputHorizontal;
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
ByteUtils.AppendAsByte(data, (int)resultInput, ref index);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool WriteSyncedData(byte[] data, ref int index, NetworkEventType eventType)
|
||||||
|
{
|
||||||
|
if (eventType != NetworkEventType.PacManTurn)
|
||||||
{
|
{
|
||||||
return inputVertical;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resultInput = (Direction)ByteUtils.ReadByte(data, ref index);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,9 +5,8 @@ namespace Marro.PacManUdon
|
|||||||
public partial class GameManager
|
public partial class GameManager
|
||||||
{
|
{
|
||||||
// A note about the quality of the code here:
|
// A note about the quality of the code here:
|
||||||
// I intended to write this using proper classes, right until I realized Udon does not support instantiating classes.
|
// I intended to write this using separate classes per time sequence, until I realized Udon does not support instantiating classes.
|
||||||
// While I'm not a big fan of the partial class solution that I ended up doing (static classes would still be neater, or perhaps separate UdonSharpBehaviour instances),
|
// While I'm not a big fan of using partial classes for this, I'm not redoing this unless there's a major Udon update before I wrap up this project.
|
||||||
// I'm not redoing this unless I get instantiatable classes before I wrap up this project.
|
|
||||||
bool currentlyInTimeSequence;
|
bool currentlyInTimeSequence;
|
||||||
bool waitingForTimeSequenceFinalize;
|
bool waitingForTimeSequenceFinalize;
|
||||||
bool jumpingToTimeSequence;
|
bool jumpingToTimeSequence;
|
||||||
|
|||||||
@@ -46,11 +46,11 @@ public class NetworkManagerSyncTester : UdonSharpBehaviour
|
|||||||
DiscardCapture();
|
DiscardCapture();
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Log($"ownerTime: {ownerTime}, remoteTime: {remoteTime}, ownerIndex: {ownerIndex} ({captureTimes[ownerIndex]}), remoteIndex: {remoteIndex} ({captureTimes[remoteIndex]})");
|
//Debug.Log($"ownerTime: {ownerTime}, remoteTime: {remoteTime}, ownerIndex: {ownerIndex} ({captureTimes[ownerIndex]}), remoteIndex: {remoteIndex} ({captureTimes[remoteIndex]})");
|
||||||
|
|
||||||
if (captureTimes[remoteIndex] == remoteTime)
|
if (captureTimes[remoteIndex] == remoteTime)
|
||||||
{
|
{
|
||||||
bool equal = IsEqual(remoteIndex);
|
bool equal = IsEqual(remoteIndex, remoteTime);
|
||||||
SetIndicator(equal);
|
SetIndicator(equal);
|
||||||
|
|
||||||
DiscardCapture();
|
DiscardCapture();
|
||||||
@@ -63,7 +63,7 @@ public class NetworkManagerSyncTester : UdonSharpBehaviour
|
|||||||
IncrementIndex(ref remoteIndex);
|
IncrementIndex(ref remoteIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool IsEqual(int index)
|
private bool IsEqual(int index, int time)
|
||||||
{
|
{
|
||||||
var equal = true;
|
var equal = true;
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ public class NetworkManagerSyncTester : UdonSharpBehaviour
|
|||||||
|
|
||||||
if (gridMover1Position != gridMover2Position)
|
if (gridMover1Position != gridMover2Position)
|
||||||
{
|
{
|
||||||
Debug.LogWarning($"{nameof(NetworkManagerSyncTester)} Desync found:\n{gridMover1.name} {gridMover1Position} != {gridMover2.name} {gridMover2Position}");
|
Debug.LogWarning($"{nameof(NetworkManagerSyncTester)} Desync found at {time} in {gridMover1.name}:\n {gridMover1Position} (local) != {gridMover2Position} (remote)");
|
||||||
//networkManager1.Pause();
|
//networkManager1.Pause();
|
||||||
//networkManager2.Pause();
|
//networkManager2.Pause();
|
||||||
equal = false;
|
equal = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user