Esempio n. 1
0
    void Fugida()
    {
        if (do_once)
        {
            rendContent.enabled = true;
            rendNormal.enabled  = false;
            run.x = this.transform.position.x * -1;
            run.y = this.transform.position.y * -1;
            run.z = this.transform.position.z;

            module = Vector3.Magnitude(run);
            run    = run / module;

            SpawnEnemyCore.restarEnemiesVius();

            do_once = false;
        }

        this.transform.position += velocityRun * run;

        fugida = true;
    }
Esempio n. 2
0
    void Fugida()
    {
        transform.Translate(1.5f, 1.5f, 0);
        if (do_once)
        {
            enemyDoneSad.enabled   = false;
            enemyDoneHappy.enabled = true;

            run.x = this.transform.position.x * -1;
            run.y = this.transform.position.y * -1;
            run.z = this.transform.position.z;

            module = Vector3.Magnitude(run);
            run    = run / module;

            SpawnEnemyCore.restarEnemiesVius();

            do_once = false;
        }

        this.transform.position += new Vector3(20, 20, 0);

        fugida = true;
    }