Пример #1
0
        private void InitializeIfNeeded()
        {
            if (_mapCreationBehaviour == null)
            {
                _mapCreationBehaviour = GameObject.FindObjectOfType <MapCreationBehaviour>();
            }

            if (_playerRepresentation == null)
            {
                _playerRepresentation = new GameObject("Player");
                _playerRepresentation.AddComponent <AudioListener>();
                _currentPosition = _mapCreationBehaviour.startPositionIJ;
                MoveRepresetnation();
            }
        }
Пример #2
0
 public void Dispose()
 {
     GameObject.Destroy(_playerRepresentation);
     _mapCreationBehaviour = null;
 }