Пример #1
0
        public void InitializePlayer(string controllerPrefix, Vector3 startPosition, PlayerTools startingTool, ToolCarousel carousel)
        {
            _controllerPrefix = controllerPrefix;
            _startPosition    = startPosition;
            _carousel         = carousel;

            ActivateTool(startingTool, 0.0f);
            Respawn();
        }
Пример #2
0
        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);
        }