Exemple #1
0
    private void Start()
    {
        attack_rate_max = attack_rate;

        wave = GetComponentInParent <Wave>();
        wave.AddToWave(this);

        Init();
    }
Exemple #2
0
    private void Start()
    {
        fire_countdown_max   = fire_countdown;
        moving_countdown_max = moving_countdown;

        snowball_controller = GetComponent <SnowballController>();
        rigid_body          = GetComponent <Rigidbody2D>();

        wave = GetComponentInParent <Wave>();
        wave.AddToWave(this);

        Init();
    }
    private void Start()
    {
        // TODO: Find a better solution
        player          = GameObject.FindGameObjectWithTag("Player");
        attack_rate_max = attack_rate;

        animator = GetComponent <Animator>();

        // Ignoring the colliders of this object to avoid the attack hitting it.
        Physics2D.IgnoreCollision(
            gameObject.GetComponent <BoxCollider2D>(),
            sword.GetComponent <BoxCollider2D>());
        // ********************************************

        wave = GetComponentInParent <Wave>();
        wave.AddToWave(this);

        Init();
    }