Ejemplo n.º 1
0
    public void DestroyBullet()
    {
        GreenBullet  greenBullet  = GetComponent <GreenBullet>();
        BlueBullet   blueBullet   = GetComponent <BlueBullet>();
        SwitchBullet switchBullet = GetComponent <SwitchBullet>();

        GameController.instance.songController.beat -= Move;

        if (greenBullet != null)
        {
            GameController.instance.songController.beat -= greenBullet.FollowPlayer;
        }
        if (blueBullet != null)
        {
            GameController.instance.songController.beat -= blueBullet.CheckSplit;
        }
        if (switchBullet != null)
        {
            GameController.instance.songController.beat -= switchBullet.CheckSwitch;
        }

        if (tag != "Laser")
        {
            Destroy(gameObject);
        }
    }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     redBullet   = gameObject.AddComponent <RedBullet>();
     blueBullet  = gameObject.AddComponent <BlueBullet>();
     gameManager = GameObject.Find("GameManager").GetComponent <GameManager>();
 }