Beispiel #1
0
 // Update is called once per frame
 void Update()
 {
     PosY += SteamMove;
     if (transparent.IsFinish())
     {
         fac.Decrease();
         Destroy(gameObject);
     }
 }
Beispiel #2
0
    // Update is called once per frame
    void Update()
    {
        //posFade.Update();
        scaleFade.Update();

        if (!isProtect)
        {
            DegAngle += OilFlyRotateSpeed;
            ScaleX    = ScaleY = scaleFade.GetCurrentValue();
        }

        if (ScaleX >= 1.0f)
        {
            isHit = true;
            GameDirector.oilFlyHitNum++;
            CreateDestroyTrans();
        }

        //防いだ時の処理
        if (saucePanManager.IsAlive)
        {
            if (!isProtect)
            {
                isProtect = true;
                CreateDestroyTrans();
            }
        }

        //消失処理
        if (destroyTrans == null)
        {
            return;
        }
        if (destroyTrans.IsFinish())
        {
            oilFac.Decrease();
            Destroy(gameObject);
        }

        //食らった時の処理
        if (!isHit)
        {
            return;
        }

        DegAngle = 0;
        ScaleX   = ScaleY = scaleFade.maxValue;
        spriteRenderer.sprite = DamageSprite;
    }