Exemple #1
0
 // Use this for initialization
 void Start()
 {
     animator      = GetComponentInChildren <Animator>();
     powerup_ui    = transform.parent.GetComponentInChildren <PowerUpUI>();
     powerup_meter = GameObject.FindObjectOfType <PowerupMeter>();
     gd            = GameObject.FindObjectOfType <GestureDetector>();
     InitializeCooldownMeter();
     InitializeBouncers();
 }
Exemple #2
0
    void Start()
    {
        _spriteRenderer        = GetComponent <SpriteRenderer>();
        _spriteRenderer.sprite = PowerUp.Image;

        _powerUpUi = FindObjectOfType <PowerUpUI>();

        _spawner = FindObjectOfType <PowerUpSpawner>();
    }
    public void InitUI(Character character)
    {
        m_avaibleMoney.text = "Avaible Money : " + (int)GameManager.Instance.CurrentTimer;

        foreach (PowerUp powerUp in character.PowerUpManager.PowerUps)
        {
            PowerUpUI powerUpUI = GameObject.Instantiate(m_powerUpUI, m_listParent).GetComponent <PowerUpUI>();
            powerUpUI.Init(this, powerUp);
        }

        gameObject.SetActive(true);
    }
Exemple #4
0
    // Use this for initialization
    void Start()
    {
        current_amount = 0f;
        powerup_ui     = GameObject.FindObjectOfType <PowerUpUI>();
        UpdateDisplay();

        grid_highlighter = transform.parent.GetComponentInChildren <GridHighlighter>();
        grid             = grid_highlighter.GetComponent <SpriteRenderer>();

        shaker = GetComponent <Shaker>();
        shaker.RegisterObject(transform.parent.position);
    }
Exemple #5
0
 protected void Awake()
 {
     powerUpUI      = FindObjectOfType <PowerUpUI>();
     spriteRenderer = GetComponent <SpriteRenderer>();
     colliderComp   = GetComponent <Collider2D>();
 }
Exemple #6
0
 // Use this for initialization
 void Start()
 {
     powerup_ui          = GameObject.FindObjectOfType <PowerUpUI>();
     powerup_meter       = GameObject.FindObjectOfType <PowerupMeter>();
     next_is_triple_shot = false;
 }
Exemple #7
0
 private void Awake()
 {
     powerUpUI = GameObject.Find("PowerUps").GetComponent <PowerUpUI>();
 }
Exemple #8
0
 void Awake()
 {
     // Initialise variables.
     Instance = this;
 }