m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
- m_Offset: {x: 7.1443787, y: 0}
+ m_Offset: {x: 30.039719, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
- m_Size: {x: 252.6164, y: 1}
+ m_Size: {x: 298.40707, y: 1}
m_EdgeRadius: 0
--- !u!4 &1527386856
Transform:
{
abyss = GetComponent<Abyss>();
health = GetComponent<Health>();
+ print(CheckPoints.Length);
}
// Update is called once per frame
if (CheckPoints[i].transform.position.x <= Mouse.transform.position.x && CheckPoints[i + 1].transform.position.x >= Mouse.transform.position.x)
{
Mouse.transform.position = CheckPoints[i].transform.position;
- } else
+ }
+ else if (CheckPoints[0].transform.position.x >= Mouse.transform.position.x)
{
- Mouse.transform.position = CheckPoints[CheckPoints.Length - 1].transform.position;
+ Mouse.transform.position = CheckPoints[0].transform.position;
+ }
+ else if(CheckPoints[CheckPoints.Length-1].transform.position.x <= Mouse.transform.position.x)
+ {
+ Mouse.transform.position = CheckPoints[CheckPoints.Length-1].transform.position;
}
if (Mouse.transform.position == CheckPoints[i].transform.position)