コード例 #1
0
    private void SpawnCentipede(Vector2 position)
    {
        Centipede centipede = new Centipede();

        centipede.Init();
        centipede.CreateCentipede(position, _centipedeBodyLength);

        _centipedesList.Add(centipede);
    }
コード例 #2
0
    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);
    }