コード例 #1
0
    IEnumerator FalterRoutine()
    {
        if (!enemyAI.isPouse)
        {
            lastAnim = anim.lastAnim;
        }
        anim.PlayAnimation(G20_AnimType.Falter, 1.0f / hirumiTime);
        falterTime = hirumiTime;
        if (enemyAI.isPouse)
        {
            yield break;
        }
        enemyAI.isPouse = true;

        while (falterTime > 0)
        {
            yield return(null);

            falterTime -= Time.deltaTime;
        }
        if (IsLife)
        {
            //最後のTime
            anim.PlayAnimation(lastAnim);
            enemyAI.isPouse = false;
        }
    }
コード例 #2
0
    public void AdjustEnemy(G20_AnimType animType, Transform controllTransform, Action onEndAction = null)
    {
        var adjustParam = FindAdjustParam(animType);

        if (adjustParam != null)
        {
            StartCoroutine(AdjustPosition(controllTransform, adjustParam, onEndAction));
        }
    }
コード例 #3
0
    public void PlayAnimation(G20_AnimType anim_type, float?anim_speed = null, Action onEndAction = null)
    {
        if (isEnding)
        {
            return;
        }
        lastAnim = anim_type;
        float AnimationSpeed = animSpeed;

        if (anim_speed != null)
        {
            AnimationSpeed = (float)anim_speed;
        }
        animator.SetFloat("Speed", AnimationSpeed);
        var animName = Enum.GetName(typeof(G20_AnimType), anim_type);

        animator.CrossFadeInFixedTime(animName, 0.4f);
        G20_EnemyAnimAdjuster.GetInstance().AdjustEnemy(anim_type, transform, onEndAction);
    }
コード例 #4
0
 G20_AdjustParam FindAdjustParam(G20_AnimType animType)
 {
     return(adjustParams.Find(x => x.animType == animType));
 }