Exemplo n.º 1
0
    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);
    }
Exemplo n.º 2
0
    // Start is called before the first frame update
    void OnEnable()
    {
        if (instance != null)
        {
            Destroy(gameObject);
            return;
        }

        instance          = this;
        _nameToSpritesMap = new Dictionary <string, Sprite>();
        LoadSprites();
    }
Exemplo n.º 3
0
 void Awake()
 {
     musicSoundClone = Instantiate(musicSound, gameObject.transform.position, Quaternion.identity);
     sprites         = GetComponent <SpritesController>();
 }