Exemple #1
0
    private void Start()
    {
        rb = GetComponent <Rigidbody2D>();

        controller = GameObject.FindGameObjectWithTag("DreamBus").GetComponent <DreamBusController>();

        timer  = timeBtw;
        health = 1;
    }
Exemple #2
0
    private void Start()
    {
        rb         = GetComponent <Rigidbody2D>();
        bus        = GameObject.FindGameObjectWithTag("DreamBus").transform;
        controller = GameObject.FindGameObjectWithTag("DreamBus").GetComponent <DreamBusController>();
        shake      = GameObject.FindGameObjectWithTag("CameraShake").GetComponent <CameraShake>();
        sm         = GameObject.FindGameObjectWithTag("SM").GetComponent <PlayerScoreManager>();

        health = 1;

        destroyParticle.transform.rotation = new Quaternion(0f, 0f, 0f, 0f);
    }
Exemple #3
0
    private void Start()
    {
        rb = GetComponent <Rigidbody2D>();

        bus = GameObject.FindGameObjectWithTag("DreamBus").transform;

        if (controller == null)
        {
            controller = GameObject.FindGameObjectWithTag("DreamBus").GetComponent <DreamBusController>();
        }
        else
        {
            return;
        }
        sm = GameObject.FindGameObjectWithTag("SM").GetComponent <PlayerScoreManager>();

        shake = GameObject.FindGameObjectWithTag("CameraShake").GetComponent <CameraShake>();

        health = 1;
    }