void Start() { shoot = FindObjectOfType <Shoot_bullet>(); sound = FindObjectOfType <Audio_manager>(); life = 1; }
// Use this for initialization void Start() { shoot = FindObjectOfType <Shoot_bullet>(); sound = FindObjectOfType <Audio_manager>(); // Invoke("ActivateShooting", Random.Range(shotTimeMin, shotTimeMax)); life = 1; //shoot.EnemyFire(); }
// 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(); }
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(); }