コード例 #1
0
    void Update()
    {
        if (IsAlive)
        {
            if (VisibleObject.IsVisible)
            {
                AnimationDuration -= Time.deltaTime;
                if (AnimationDuration <= 0)
                {
                    Animate();
                    AnimationDuration = 1.2f;
                }
            }

            if (ContainerHealth <= 0f)
            {
                HealthTimer -= Time.deltaTime;
                ArrowController.SetProgress(HealthTimer / MaxHealthTimer);
                if (HealthTimer <= 0)
                {
                    HealthTimerExpired();
                }
            }
        }
    }