Пример #1
0
    void Start()
    {
        shoot = FindObjectOfType <Shoot_bullet>();

        sound = FindObjectOfType <Audio_manager>();

        life = 1;
    }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        shoot = FindObjectOfType <Shoot_bullet>();

        sound = FindObjectOfType <Audio_manager>();

        // Invoke("ActivateShooting", Random.Range(shotTimeMin, shotTimeMax));

        life = 1;

        //shoot.EnemyFire();
    }
Пример #3
0
    // Use this for initialization
    //amit az elején akarok, mert csak egyszer csinálja meg
    void Start()
    {
        myridgedbody = GetComponent <Rigidbody2D>(); // hozzáfér a player adatához

        // mycollider = GetComponent<Collider2D>(); // a playerhez kapcsolt collidet használja

        myanimator = GetComponent <Animator>(); //animátor componensek

        jumptimecounter = jumptime;

        speedMilestoneCounte        = speedIncreaseMilestone;
        speedIncreaseMilestoneStore = speedIncreaseMilestone;

        movespeedstore = movespeed;

        speedmilestonecountstore = speedMilestoneCounte;



        tempMoveSpeedUp = movespeed * speedup;

        tempMoveSpeedDown = movespeed * speeddown;

        tempMoveSpeedDownstore = tempMoveSpeedDown;
        tempMoveSpeedUpstore   = tempMoveSpeedUp;


        pause = FindObjectOfType <Pause_menu>();


        sound = FindObjectOfType <Audio_manager>();

        shoot = FindObjectOfType <Shoot_bullet>();

        life = 3f;

        lifetext.text = "Life: " + Mathf.Round(life);



        sound.MainTheme();
    }
Пример #4
0
    void Start()
    {
        myridgedbody = GetComponent <Rigidbody2D>();

        myanimator = GetComponent <Animator>();

        jumptimecounter = jumptime;

        speedMilestoneCounte        = speedIncreaseMilestone;
        speedIncreaseMilestoneStore = speedIncreaseMilestone;

        movespeedstore = movespeed;

        speedmilestonecountstore = speedMilestoneCounte;



        tempMoveSpeedUp = movespeed * speedup;

        tempMoveSpeedDown = movespeed * speeddown;

        tempMoveSpeedDownstore = tempMoveSpeedDown;
        tempMoveSpeedUpstore   = tempMoveSpeedUp;


        pause = FindObjectOfType <Pause_menu>();


        sound = FindObjectOfType <Audio_manager>();

        shoot = FindObjectOfType <Shoot_bullet>();

        life = 3f;

        lifetext.text = "Life: " + Mathf.Round(life);



        sound.MainMusic();
    }