Esempio n. 1
0
    protected void Awake()
    {
        lifevars  = this.getvars <lifescript>();
        sprayvars = this.getvars <sprayattack>();

        rend = GetComponent <SpriteRenderer>();
        coll = GetComponent <Collider2D>();

        gameObject.SetActive(false);
    }
Esempio n. 2
0
    protected new void Awake()
    {
        base.Awake();

        (rend = GetComponent <SpriteRenderer>()).enabled = false;
        (coll = GetComponent <Collider2D>()).enabled     = false;
        lifevars = GetComponent <lifescript>();
        if (lifevars != null)
        {
            lifevars.death = death;
            lifevars.life  = maxhealth;

            lifevars.whileDying  = coll.disable;
            lifevars.whileDying += resetCoolDown;
        }


        cooldownTimer = 2.5f;
        closeTimer    = new timelib.timer(cooldownTimer);
    }
Esempio n. 3
0
 void Start()
 {
     lifeScript = GameObject.FindGameObjectWithTag("HP").GetComponent <lifescript>();
 }
Esempio n. 4
0
 // Use this for initialization
 void Start()
 {
     rigidbody2D = GetComponent <Rigidbody2D>();
     lifeScript  = GameObject.FindGameObjectWithTag("HP").GetComponent <lifescript>();
 }
Esempio n. 5
0
    // Start is called before the first frame update
    void Awake()
    {
        Alien = GameObject.Find("Alien");

        lifescript = Alien.GetComponent <lifescript>();
    }