修复肌肉bug
This commit is contained in:
parent
5b17154d3c
commit
38b3180a58
@ -48,13 +48,17 @@ namespace QFramework.Example
|
|||||||
item.gameObject.SetActive(true);
|
item.gameObject.SetActive(true);
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
|
if (index >= bodys.Count)
|
||||||
|
{
|
||||||
|
index = bodys.Count - 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Sub()
|
public void Sub()
|
||||||
{
|
{
|
||||||
if (index > 0)
|
if (index >= 0)
|
||||||
{
|
{
|
||||||
string name = bodys[index];
|
string name = bodys[index];
|
||||||
var body = root.subBody[name];
|
var body = root.subBody[name];
|
||||||
@ -66,6 +70,10 @@ namespace QFramework.Example
|
|||||||
item.gameObject.SetActive(false);
|
item.gameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
index--;
|
index--;
|
||||||
|
if (index < 0)
|
||||||
|
{
|
||||||
|
index = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user