private void SpawnCentipede(Vector2 position) { Centipede centipede = new Centipede(); centipede.Init(); centipede.CreateCentipede(position, _centipedeBodyLength); _centipedesList.Add(centipede); }
public void CreateNewCentipede(GameObject headGameObject, Vector2 lastPosition, List <CentipedeTail> remainingTail, HorizontalDirection horizontalDirection, VerticalDirection verticalDirection) { CentipedeCount += 1; Centipede centipede = new Centipede(); centipede.Init(); centipede.CreateCentipede(headGameObject, lastPosition, remainingTail, horizontalDirection, verticalDirection); _centipedesList.Add(centipede); }