Beispiel #1
0
    private void Start()
    {
        inv = GetComponent <InvencibilityOnDamage>();

        inv.charges = GameObject.FindWithTag("ScoreShield")
                      .GetComponent <Score>().scorePoints;
    }
Beispiel #2
0
    protected override void Trigger(GameObject other)
    {
        InvencibilityOnDamage inv = other.gameObject.GetComponent <InvencibilityOnDamage>();

        if (inv)
        {
            inv.AddInvencibility();
        }

        base.Trigger(other);
    }
Beispiel #3
0
    private void Start()
    {
        inv = GetComponent <InvencibilityOnDamage>();

        move = GetComponent <ObjectMoveWithRandomlyFactor>();

        gridC = GameObject.FindWithTag("MapController").GetComponent <GridController>();

        timer = Random.Range(attackDelay - 2, attackDelay + 3);

        anim = GetComponent <Animator>();
    }
Beispiel #4
0
    private bool HaveShield()
    {
        InvencibilityOnDamage inv = GetComponent <InvencibilityOnDamage>();

        if (inv)
        {
            if (inv.charges > 0)
            {
                inv.Active();

                return(true);
            }
            return(false);
        }
        else
        {
            return(false);
        }
    }