void Alarm2()
    {
        if (player != null)
        {
            float a = GMComponent.PointDirection(
                transform.position.x,
                transform.position.y,
                player.transform.position.x + 20,
                player.transform.position.y - 20
                );

            float asd = 0.0f;

            for (int i = 0; i < 8; i++)
            {
                GMComponent gmcObj =
                    Instantiate(karaHurudan, transform.position, Quaternion.identity)
                    .GetComponent <GMComponent>();

                gmcObj.Speed     = 25;
                gmcObj.Direction = a + asd;

                asd += 360 / 8;
            }

            Invoke("Alarm2", 1.0f / GM.fps * 1.75f);
        }
    }
Beispiel #2
0
    public void Alarm0()
    {
        if (preventAlarm0)
        {
            return;
        }

        float       a      = GMComponent.PointDirection(GM.offsetX + 800, GM.offsetY - 0, player.transform.position.x, player.transform.position.y);
        GMComponent gmcObj =
            Instantiate(object724, new Vector2(GM.offsetX + 800, GM.offsetY - 0), Quaternion.identity)
            .GetComponent <GMComponent>();

        gmcObj.Speed     = 30;
        gmcObj.Direction = a;


        a      = GMComponent.PointDirection(GM.offsetX + 0, GM.offsetY - 0, player.transform.position.x, player.transform.position.y);
        gmcObj =
            Instantiate(object724, new Vector2(GM.offsetX + 0, GM.offsetY - 0), Quaternion.identity)
            .GetComponent <GMComponent>();

        gmcObj.Speed     = 30;
        gmcObj.Direction = a;

        Invoke("Alarm0", 1.0f / GM.fps);
    }
 public void Alarm1()
 {
     t  = 1;
     pd = GMComponent.PointDistance(
         GM.offsetX + p1, GM.offsetY - p2,
         player.transform.position.x, player.transform.position.y);
     d = GMComponent.PointDirection(
         GM.offsetX + p1, GM.offsetY - p2,
         player.transform.position.x, player.transform.position.y);
 }
    void OnDestroy()
    {
        float a = GMComponent.PointDirection(
            transform.position.x,
            transform.position.y,
            player.transform.position.x,
            player.transform.position.y);
        float asd = 0;

        for (int i = 0; i < 10; i++)
        {
            GMComponent gmcObj = Instantiate(hanabi, transform.position, Quaternion.identity)
                                 .GetComponent <GMComponent>();

            gmcObj.Speed     = 16;
            gmcObj.Direction = a + asd;
            asd += 360 / 10;
        }
    }
 public void Alarm0()
 {
     t  = 1;
     pd = GMComponent.PointDistance(p1, p2, transform.position.x, transform.position.y);
     d  = GMComponent.PointDirection(p1, p2, transform.position.x, transform.position.y);
 }