// Update is called once per frame void Update() { esaP = APScript.EsaPGetter(); //取った時に変わる個数 if (esaP == 10) { playerModel1.SetActive(false); playerModel2.SetActive(true); playerModel3.SetActive(false); playerModel4.SetActive(false); Effect1.SetActive(true); Destroy(Effect1, 1f); } if (esaP == 20) { playerModel1.SetActive(false); playerModel2.SetActive(false); playerModel3.SetActive(true); playerModel4.SetActive(false); Effect2.SetActive(true); Destroy(Effect2, 1f); } if (esaP == 45) { playerModel1.SetActive(false); playerModel2.SetActive(false); playerModel3.SetActive(false); playerModel4.SetActive(true); Effect3.SetActive(true); Destroy(Effect3, 1f); } }
void Start() { //add velocity to the bullet at creation body.velocity = transform.up * 5; APScript = GameObject.FindGameObjectWithTag("APHandler").GetComponent <APScript>(); }