Exemplo n.º 1
0
    private void _OnCheck()
    {
        if (!reimu)
        {
            return;
        }
        Vector3 v   = reimu.position - t.position;
        float   dis = Mathf.Sqrt(v.x * v.x + v.y * v.y);

        if (dis <= safeDis)
        {
            if (hit)
            {
                hit.GetHit();
            }
            Destroy(this.gameObject);
        }
    }
Exemplo n.º 2
0
    private void _Spark()
    {
        if (!Input.GetKeyDown(KeyCode.X))
        {
            return;
        }
        Spark.MasterSpark(out bool isDying);
        //if (!isDying)
        //    return;
        GameObject[] dangan = GameObject.FindGameObjectsWithTag("EBullet");
        ReimuBoss    r      = GameObject.Find("Reimu").GetComponent <ReimuBoss> ();

        for (int i = 0; i < dangan.Length; i++)
        {
            Destroy(dangan[i]);
        }
        if (r)
        {
            r.GetHit(SparkHit);
        }
    }