Minor update

This commit is contained in:
unknown
2022-12-15 13:25:22 +02:00
parent 2be214ef66
commit 12a06ba2f2
10 changed files with 134 additions and 19 deletions

View File

@@ -202,8 +202,6 @@ public class GameplayManager : MonoBehaviour
playerTwoObject.GetComponent<CpuController>().SetOtherPlayer(playerOneObject.transform);
playerOneObject.SetActive(true);
playerTwoObject.SetActive(true);
PlayerOne.transform.position = new Vector2(_spawnPositionsX[0], (float)DemonicsPhysics.GROUND_POINT);
PlayerTwo.transform.position = new Vector2(_spawnPositionsX[1], (float)DemonicsPhysics.GROUND_POINT);
if (SceneSettings.ControllerOne != null && _controllerOneType != ControllerTypeEnum.Cpu)
{
_playerOneController.SetControllerToPlayer();

View File

@@ -51,7 +51,14 @@ public class ObjectPoolingManager : MonoBehaviour
public GameObject GetObject(string name)
{
return _jumpEffects[0];
for (int i = 0; i < _jumpEffects.Count; i++)
{
if (!_jumpEffects[i].activeSelf)
{
return _jumpEffects[i];
}
}
return null;
}
public DemonicsAnimator GetObjectAnimation(string name)