void Awake() { hitsCounter = 0; playerMovementController = this.gameObject.AddComponent <PlayerMovementController>(); animationController = this.gameObject.AddComponent <AnimationController>(); spritesController = this.gameObject.AddComponent <SpritesController>(); blinkRoutine = new BlinkRoutine(this); configComponents(); GameController.getInstance().suscribeToGame(this); }
// Start is called before the first frame update void OnEnable() { if (instance != null) { Destroy(gameObject); return; } instance = this; _nameToSpritesMap = new Dictionary <string, Sprite>(); LoadSprites(); }
void Awake() { musicSoundClone = Instantiate(musicSound, gameObject.transform.position, Quaternion.identity); sprites = GetComponent <SpritesController>(); }