Merge remote-tracking branch 'origin/Over' into Syntriax
This commit is contained in:
@@ -2653,7 +2653,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5846939066456683150, guid: 31e12405ec9ab4145bfae33b308ffae1, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 13
|
||||
value: 23
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5846939066456683150, guid: 31e12405ec9ab4145bfae33b308ffae1, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
@@ -2761,6 +2761,14 @@ PrefabInstance:
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 698768805, guid: 2ed6bfce9ad3e19428cb9bef743e0fa3, type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 1.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2083070161, guid: 2ed6bfce9ad3e19428cb9bef743e0fa3, type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 1.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7008207192594766305, guid: 2ed6bfce9ad3e19428cb9bef743e0fa3, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Player
|
||||
|
@@ -183,13 +183,13 @@ CompositeCollider2D:
|
||||
Y: 9999959
|
||||
- X: 10000100
|
||||
Y: 19999900
|
||||
- X: 50000041
|
||||
- X: 9999959
|
||||
Y: 19999900
|
||||
- X: 50000100
|
||||
- X: 9999900
|
||||
Y: 19999959
|
||||
- X: 50000100
|
||||
- X: 9999900
|
||||
Y: 30000041
|
||||
- X: 50000041
|
||||
- X: 9999959
|
||||
Y: 30000100
|
||||
- X: 10000100
|
||||
Y: 30000100
|
||||
@@ -241,10 +241,16 @@ CompositeCollider2D:
|
||||
Y: 30000041
|
||||
- X: 210000041
|
||||
Y: 30000100
|
||||
- X: 89999959
|
||||
- X: 49999959
|
||||
Y: 30000100
|
||||
- X: 89999900
|
||||
- X: 49999900
|
||||
Y: 30000041
|
||||
- X: 49999900
|
||||
Y: 19999959
|
||||
- X: 49999959
|
||||
Y: 19999900
|
||||
- X: 89999900
|
||||
Y: 19999900
|
||||
- X: 89999900
|
||||
Y: -9999900
|
||||
- X: -70000041
|
||||
@@ -260,10 +266,6 @@ CompositeCollider2D:
|
||||
m_CompositePaths:
|
||||
m_Paths:
|
||||
- - {x: 0.9999748, y: 0.99999}
|
||||
- {x: 1.0000395, y: 1.99999}
|
||||
- {x: 5.00001, y: 2.0000253}
|
||||
- {x: 4.9999747, y: 3.00001}
|
||||
- {x: 1.00001, y: 3.0000393}
|
||||
- {x: 0.9999748, y: 8.00001}
|
||||
- {x: -7.0000095, y: 7.9999747}
|
||||
- {x: -6.9999743, y: 0.99999}
|
||||
@@ -277,7 +279,9 @@ CompositeCollider2D:
|
||||
- {x: 17.00004, y: 1.99999}
|
||||
- {x: 21.00001, y: 2.0000253}
|
||||
- {x: 20.999975, y: 3.00001}
|
||||
- {x: 8.99999, y: 2.9999747}
|
||||
- {x: 4.99999, y: 2.9999747}
|
||||
- {x: 5.0000253, y: 1.99999}
|
||||
- {x: 8.99999, y: 1.9999607}
|
||||
- {x: 8.999961, y: -0.99999}
|
||||
- {x: -7.0000095, y: -1.0000252}
|
||||
- {x: -6.9999743, y: -6.00001}
|
||||
@@ -2858,7 +2862,7 @@ Tilemap:
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 1, y: 2, z: 0}
|
||||
- first: {x: 5, y: 2, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 7
|
||||
@@ -2868,7 +2872,7 @@ Tilemap:
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 2, y: 2, z: 0}
|
||||
- first: {x: 6, y: 2, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 6
|
||||
@@ -2878,7 +2882,7 @@ Tilemap:
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 3, y: 2, z: 0}
|
||||
- first: {x: 7, y: 2, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 5
|
||||
@@ -2888,7 +2892,7 @@ Tilemap:
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 4, y: 2, z: 0}
|
||||
- first: {x: 8, y: 2, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 4
|
||||
@@ -3996,7 +4000,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5846939066456683150, guid: 31e12405ec9ab4145bfae33b308ffae1, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 7
|
||||
value: 3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5846939066456683150, guid: 31e12405ec9ab4145bfae33b308ffae1, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
|
@@ -5,25 +5,49 @@ namespace Platforms
|
||||
{
|
||||
public class MovingPlatform : MonoBehaviour, IMovement
|
||||
{
|
||||
public float xOffeset;
|
||||
public float yOffset;
|
||||
|
||||
private Rigidbody2D _platformRigidbody;
|
||||
|
||||
private Vector3 _velocity = Vector3.zero;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_platformRigidbody = GetComponent<Rigidbody2D>();
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
if (!IsPaused)
|
||||
Move(BaseSpeed);
|
||||
}
|
||||
|
||||
// PAUSING METHODS
|
||||
|
||||
public bool IsPaused { get; }
|
||||
public bool IsPaused { get; private set; }
|
||||
public void Pause()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
IsPaused = true;
|
||||
_platformRigidbody.simulated = !IsPaused;
|
||||
}
|
||||
|
||||
public void Resume()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
IsPaused = false;
|
||||
_platformRigidbody.simulated = !IsPaused;
|
||||
}
|
||||
|
||||
// MOVEMENT METHODS
|
||||
|
||||
public float BaseSpeed { get; set; }
|
||||
|
||||
public void Move(float value)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
var position = transform.position;
|
||||
var targetPosition = new Vector3(position.x + xOffeset, position.y + yOffset, 0.0f);
|
||||
position = Vector3.SmoothDamp(position, targetPosition, ref _velocity, 1.0f, 1.0f);
|
||||
transform.position = position;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user