Пример #1
0
    // Update is called once per frame
    void Update()
    {
        if (isTouch)
        {
            MoveX   = Random.Range(-PopWide, PopWide);
            MoveY   = Random.Range(PopMinSpeed, PopMaxSpeed);
            isCatch = true;
            isTouch = false;
        }
        else
        {
            VibrationCount -= 1;

            if (VibrationCount <= 0)
            {
                float px = Random.Range(-VibrationWidth, VibrationWidth);
                AddPosition(px, 0, 0);
                VibrationCount = 15;
            }
        }

        if (isCatch)
        {
            AddPosition(MoveX, MoveY, 0);
        }
        if (PosY > 10)
        {
            koromoFac.Decrease();
            Destroy(gameObject);
        }
    }
Пример #2
0
 // Update is called once per frame
 void Update()
 {
     PosY += SteamMove;
     if (transparent.IsFinish())
     {
         fac.Decrease();
         Destroy(gameObject);
     }
 }
Пример #3
0
 private void ScreenOut()
 {
     if (PosX > 10.0f)
     {
         state.AddBit(State.Death);
     }
     if (state.CheckBit(State.Death))
     {
         customerFac.Decrease();
         Destroy();
     }
 }
Пример #4
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;
    }