public void InitializePlayer(string controllerPrefix, Vector3 startPosition, PlayerTools startingTool, ToolCarousel carousel) { _controllerPrefix = controllerPrefix; _startPosition = startPosition; _carousel = carousel; ActivateTool(startingTool, 0.0f); Respawn(); }
private void Start() { PlayingFieldGrid grid = FindObjectOfType <PlayingFieldGrid>(); PlayerMovement playerMovementScript = transform.Find("Player Character Container").GetComponent <PlayerMovement>(); ToolCarousel carouselScript = transform.Find("Tool Carousel").GetComponent <ToolCarousel>(); carouselScript.Initialize(grid.GetCarouselPosition(_playsFromLeft), _startingTool, playerMovementScript.transform.parent.name); playerMovementScript.InitializePlayer($"P{_playerIndex}", grid.GetPlayerStartPosition(_playsFromLeft), _startingTool, carouselScript); }