Ejemplo n.º 1
0
    void GameOver()
    {
        DeathZoneScript deathscript = GameObject.Find("DeathZone").GetComponent <DeathZoneScript>();

        if (isPicking == false && fuelLevel <= 0)
        {
            gameover = true;
        }
    }
Ejemplo n.º 2
0
    void DeathZone()
    {
        GameObject obj = new GameObject("DeathZone");

        obj.tag = "Deathzone";
        BoxCollider2D bc = obj.AddComponent <BoxCollider2D> ();

        bc.size = new Vector2(1f, 20f);
        DeathZoneScript dzs = obj.AddComponent <DeathZoneScript> ();

        dzs.target = transform;
    }
Ejemplo n.º 3
0
    // Use this for initialization

    private void Awake()
    {
        deathscript = gameObject.GetComponentInParent <DeathZoneScript>();
    }