void InitializeCharacterRenderers(AnimationRenderer charAnimator) { Dictionary <string, SpriteRenderer> spriteRenderers = new Dictionary <string, SpriteRenderer>(); foreach (string blockKey in DNABlockType.GetTypeList()) { GameObject blockObject = new GameObject(blockKey); blockObject.transform.parent = _playerObject.transform; spriteRenderers[blockKey] = blockObject.AddComponent <SpriteRenderer>(); } charAnimator.InitializeSpriteRenderers(spriteRenderers); }
private void InitializeCharacterRenderers(AnimationRenderer charAnimator) { var spriteRenderers = new Dictionary <string, SpriteRenderer>(); foreach (var blockKey in DNABlockType.TypeList) { GameObject blockObject = new GameObject(blockKey); blockObject.transform.parent = _playerObject.transform; blockObject.transform.position += Vector3.right * 3; blockObject.transform.localScale = new Vector3(6, 6, 6); spriteRenderers[blockKey] = blockObject.AddComponent <SpriteRenderer>(); } charAnimator.InitializeSpriteRenderers(spriteRenderers); }