Пример #1
0
    IEnumerator TotalWinnerAnimation()
    {
        CharacterAnim.ChangeAnimation(CharacterAnim.AnimStasis.WIN, TotalWinner);
        yield return(new WaitForSeconds(CharacterAnim.GetWinDuration(TotalWinner)));

        CharacterAnim.ChangeAnimation(CharacterAnim.AnimStasis.WINNING, TotalWinner);
    }
Пример #2
0
    private void Awake()
    {
        gun = GetComponentInChildren <Weapon>();

        characterStats = GetComponent <CharacterStats>();
        characterAnim  = GetComponentInChildren <CharacterAnim>();
    }
Пример #3
0
    /// <summary>
    /// This method will be called when the health of our character in the Damageable Component has reached 0. Any cleanup shoud be done here
    /// </summary>
    public virtual void OnCharacterDied(FDamageData DamageData)
    {
        // If this is not a Death type attack, then we will skip this method
        if (DamageData.DamageType != EHDamageableComponent.EDamageType.DEATH)
        {
            return;
        }

        if (CharacterAnim)
        {
            CharacterAnim.SetTrigger(ANIM_CHARACTER_DIED);
        }
        this.gameObject.layer = LayerMask.NameToLayer(DEAD_LAYER);
        if (CharacterController)
        {
            CharacterController.enabled = false;
        }
        if (MovementComponent)
        {
            MovementComponent.enabled = false;
        }
        if (HitboxComponent)
        {
            HitboxComponent.enabled = false;
        }
        if (DamageableComponent)
        {
            DamageableComponent.enabled = false;
        }
        if (AttackComponent)
        {
            AttackComponent.enabled = false;
        }
    }
Пример #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="Damage"></param>
 private void OnKilledCharacter(FAttackData Damage, EHDamageableComponent DamageComponentWeHit)
 {
     if (DamageComponentWeHit.Health <= 0)
     {
         CharacterAnim.SetTrigger(ANIM_KILL_CANCEL);
     }
 }
Пример #5
0
 public void InitData()
 {
     characterSkin  = new CharacterSkin(this);
     characterEquip = new CharacterEquip(this);
     characterAnim  = new CharacterAnim(this);
     CharacterItems = new CharacterItems(this);
 }
Пример #6
0
    IEnumerator TotalLoserAnimation()
    {
        CharacterAnim.ChangeAnimation(CharacterAnim.AnimStasis.LOSE, 1 - TotalWinner);
        yield return(new WaitForSeconds(CharacterAnim.GetLoseDuration(1 - TotalWinner) - 0.25f));

        CharacterAnim.ChangeAnimation(CharacterAnim.AnimStasis.LOSING, 1 - TotalWinner);
    }
Пример #7
0
 IEnumerator AnimationRun()
 {
     CharacterAnim.ChangeAnimation(CharacterAnim.AnimStasis.SRUSH, 1f);
     //1번애니
     for (int i = 0; i < 3; i++)
     {
         CharacterAnim.ChangeAnimation(AttackAnims[CHALLANGER + i * 2], CHALLANGER);
         CharacterAnim.ChangeAnimation(AttackAnims[CHAMPION + i * 2], CHAMPION);
         yield return(new WaitForSeconds(0.98f));
     }
 }
Пример #8
0
    IEnumerator ShootAnimation()
    {
        CharacterAnim.SetBool("Idle", false);
        if (CharacterAnim.GetInteger("Angle") >= -30 && CharacterAnim.GetInteger("Angle") <= 30)
        {
            CharacterAnim.Play("CharacterShoot");
        }
        else if (CharacterAnim.GetInteger("Angle") >= 30 && CharacterAnim.GetInteger("Angle") <= 130)
        {
            CharacterAnim.Play("CharacterShooting45_90");
        }
        else if (CharacterAnim.GetInteger("Angle") >= -130 && CharacterAnim.GetInteger("Angle") <= -30)
        {
            CharacterAnim.Play("CharacterShootingN45_90");
        }
        else
        {
            CharacterAnim.Play("CharacterShooting45_90");
        }
        yield return(new WaitForSeconds(0.27f));

        GameObject.Find("SideGun").GetComponent <AudioSource>().Play();
        CharacterAnim.enabled = false;
        if (CharacterAnim.GetInteger("Angle") >= -30 && CharacterAnim.GetInteger("Angle") <= 30)
        {
            PlayerGun.rotation = Quaternion.Euler(0, 0, (AimLine.eulerAngles.z));
        }
        else if (CharacterAnim.GetInteger("Angle") >= 30 && CharacterAnim.GetInteger("Angle") <= 130)
        {
            PlayerGun.rotation = Quaternion.Euler(0, 0, (AimLine.eulerAngles.z));
        }
        else if (CharacterAnim.GetInteger("Angle") >= -130 && CharacterAnim.GetInteger("Angle") <= -30)
        {
            PlayerGun.rotation = Quaternion.Euler(0, 0, (AimLine.eulerAngles.z + 12.155f));
        }
        yield return(new WaitForSeconds(0.07f));

        if (didHit == true)
        {
            BulletArrivalTime = Distance / BulletScript.velocity;
            StartCoroutine(HitEffects(BulletArrivalTime, HitPosition));
        }
        if (didHitGround == true)
        {
            BulletArrivalTime = Distance / BulletScript.velocity;
            StartCoroutine(HitEffectsOnGround(BulletArrivalTime, HitPosition));
        }
        GenerateBullet();
        GameObject.Find("GunShotFire").GetComponent <ParticleSystem>().Play();
        //GameObject.Find("GunShotSmoke").GetComponent<ParticleSystem>().Play();

        StartCoroutine(GunPunch());
    }
Пример #9
0
    void Initialize()
    {
        UMAInstance();

        gameObject = new GameObject(objectName);
        UpdateVec();

        umaContext = UMAContext.FindInstance();
        UMAGenerator generator = umaContext.umaGenerator;

        umaDynamicAvatar = gameObject.AddComponent <UMADynamicAvatar>();
        umaDynamicAvatar.Initialize();

        UMAData umaData = umaDynamicAvatar.umaData;

        umaDynamicAvatar.umaGenerator = generator;
        umaData.umaGenerator          = generator;

        UMATextRecipe recipe = UMATextRecipe.CreateInstance <UMATextRecipe>();

        recipe.Load(umaData.umaRecipe, umaContext);
        umaDynamicAvatar.umaRecipe = recipe;
        umaData.AddAdditionalRecipes(new UMARecipeBase[] { umaContext.umaTextRecipe }, umaContext);
        umaData.OnCharacterCreated   += CharacterCreated;
        umaData.OnCharacterUpdated   += CharacterUpdated;
        umaData.OnCharacterDestroyed += CharacterDestroyed;

        if (isExpress)
        {
            expressionPlayer = gameObject.AddComponent <UMAExpressionPlayer>();
            expressionPlayer.overrideMecanimEyes = true;
            expressionPlayer.overrideMecanimHead = true;
            expressionPlayer.overrideMecanimJaw  = true;
            expressionPlayer.overrideMecanimNeck = true;
        }

        umaData.umaRecipe.slotDataList = new SlotData[100];
        UMADnaHumanoid umaDna         = new UMADnaHumanoid();
        UMADnaTutorial umaTutorialDNA = new UMADnaTutorial();

        umaData.umaRecipe.AddDna(umaDna);
        umaData.umaRecipe.AddDna(umaTutorialDNA);

        ICharacterSlotOverly characterSlotOverlay = new CharacterSlotOverly(umaDynamicAvatar);

        characterAnim = new CharacterAnim(umaDynamicAvatar);
        //characterDna = new CharacterDna(umaDna, umaData, characterAnim, characterData);
        characterBase  = new CharacterBase(resType, characterSlotOverlay, umaData, umaDynamicAvatar, characterData);
        characterCloth = new CharacterCloth(resType, characterData, characterSlotOverlay, this, characterBase);
    }
Пример #10
0
    //도발 ''


    public void Skill_DefaultPassive(ref SkillSlot List)//게임시스템패시브(치명타, 방어추뎀, 다운추뎀)
    {
        CharacterStatus OrderStat;
        Skill           Critical = new Skill("Critical");//치명타

        Critical.PassiveCount.Add("Critical", ProbabilityData.Critical);
        Critical.PassiveCount.Add("BaseCritical", ProbabilityData.Critical);
        Critical.SetCharacter(List.GetComponent <CharacterStatus>().Controller);
        Critical.AddPassive(
            delegate(Skill skil)
        {
            OrderStat = gameManager.ins.UserStatus[skil.Order];
            if (gameManager.ins.UserStatus[OrderStat.Enemy()].WallDistance == 0)
            {
                skil.PassiveCount["Critical"] += 80;
            }
            if (Random.Range(0, (100 / skil.PassiveCount["Critical"])) < 1)    //5%
            {
                Debug.Log("크리티컬");
                DamageCalculator.ins.AddDamage(DamageCalculator.MULTIPLE_s, 1.5f, "Critical");
                SaveData.ins.AddData(SaveData.TYPE.CRITICAL, skil.Order, 1);
            }
            if (gameManager.ins.UserStatus[OrderStat.Enemy()].WallDistance == 0)
            {
                skil.PassiveCount["Critical"] -= 80;
            }
        }
            , "Attack");
        List.AddPassiveSlot(Critical);

        Skill SuperArmor = new Skill("SuperArmor");

        SuperArmor.SetCharacter(List.GetComponent <CharacterStatus>().Controller);
        SuperArmor.PassiveCount.Add("isHit", 0);
        SuperArmor.AddPassive(delegate(Skill skill)
        {
            skill.PassiveCount["isHit"] = 1;
        }, "Hit");
        SuperArmor.AddPassive(delegate(Skill skill)
        {
            if (gameManager.ins.UserStatus[skill.Order].isSuperArmor && skill.PassiveCount["isHit"] == 1)
            {
                CharacterAnim.ChangeAnimation(CharacterAnim.AnimStasis.LAND, skill.Order);
                WallManager.ins.ResetPivot();
            }

            skill.PassiveCount["isHit"] = 0;
        }, "WallSetting");
        List.AddPassiveSlot(SuperArmor);
    }
Пример #11
0
    IEnumerator Idle()
    {
        if (TrainingMode == "AimAndReaction")
        {
            ResetGame();
        }
        CharacterAnim.enabled = true;
        CharacterAnim.SetBool("Idle", true);
        AimLineAnim.SetBool("AimLine", true);
        AimLineRotator.freeze = false;
        yield return(new WaitForSeconds(1f));

        ableToShoot           = true;
        btnShoot.interactable = true;
    }
Пример #12
0
    IEnumerator StopWalking()
    {
        yield return(new WaitForSeconds(2.5f));

        CharacterAnim.SetBool("Walking", false);
        AimLineAnim.SetBool("AimLine", true);
        yield return(new WaitForSeconds(0.5f));

        CharacterPhysics.velocity = new Vector2(0f, 0f);
        CharacterAnim.SetBool("Idle", true);
        yield return(new WaitForSeconds(0.5f));

        ableToShoot           = true;
        btnShoot.interactable = true;
    }
Пример #13
0
    //회복
    private void AddSkill_Energy(ref SkillSlot List)
    {
        CharacterStatus Orderstat;                                     //스텟받아올 변수
        Skill           Energy = new Skill(Priority.ENERGY, "Energy"); //우선순위 = 가드, 이름 Guard설정

        Energy.PassiveCount.Add("Switch", 0);                          //패시브카운트에 "RSPATTACK"추가

        Energy.ActiveSkillSet(delegate(Skill skil)
        {//사용시
            skil.GetOrder().DontDash = true;
            gameManager.ins.AnimationSetting(skil.Order, 0, CharacterAnim.AnimStasis.MANA);
            gameManager.ins.AnimationSetting(skil.Order, 1, CharacterAnim.AnimStasis.MANA);
            skil.PassiveCount["Switch"] = 1;
        });//액티브 스킬 사용

        Energy.AddPassive(delegate(Skill skl)
        {//체크
            Orderstat = gameManager.ins.UserStatus[skl.Order];
            if (skl.PassiveCount["Switch"] == 1)
            {
                EffectManager.ins.EffectRun(skl.GetOrder().transform, Vector3.one, "Energy", false);
                CharacterAnim.ChangeAnimation(CharacterAnim.AnimStasis.MANA, skl.Order);
                Orderstat.CostPlus((int)(CostData.EnergyRecovery * gameManager.ins.TimingWeight[skl.Order]));
                SoundManager.ins.RunAudio("마나 채울때");
            }
        }, "Decision");//시작시 발동
        Energy.AddPassive(delegate(Skill skl)
        {
            if (skl.GetEnemy().Guard)
            {
                gameManager.ins.AnimationSetting(skl.Order, 1, CharacterAnim.AnimStasis.MANA);
            }
        }
                          , "Hit");
        Energy.AddPassive(delegate(Skill skl)
        {
            skl.GetOrder().DontDash = false;
            if (skl.PassiveCount["Switch"] == 1)
            {
                skl.PassiveCount["Switch"] = 0;
            }
        }
                          , "End");

        List.GetSlot("회복").SkillChange(Energy);
    }
Пример #14
0
    private void Start()
    {
        instance = this;

        DeathHUD.SetActive(false);
        WinHUD.SetActive(false);
        TimerHUD.SetActive(false);
        bossPrefab.SetActive(false);

        Wave = 1;
        Dead = false;
        //spawnPoints = new List<Transform>(4);

        Wonder = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterAnim>();
        Door   = GameObject.FindGameObjectWithTag("Door").GetComponent <DoorAnim>();

        state = BattleState.START;
        StartCoroutine(SetupGame());
    }
Пример #15
0
        protected virtual void RegistAnimEvent()
        {
            CharacterAnim character = m_CharacterAnim;

            character.OnEnterHardTime += this.HardTime;
            character.OnSetFaceLock   += this.SetFaceLock;
            character.OnMoveActor     += this.MoveActor;
            character.OnCallPuppet    += this.CallPuppet;

            character.OnSetSpeed        += this.SetSpeed;
            character.OnStopMove        += this.StopMove;
            character.OnSetDirMoveSpeed += this.SetMoveSpeed;

            character.OnSetImdVSpeed      += this.SetImdVSpeed;
            character.OnSetImdHSpeed      += this.SetImdHSpeed;
            character.OnSetImdVSpeed      += this.SetImdVSpeed;
            character.OnSetImdMoveSpeed   += this.SetImdSpeed;
            character.OnSetInAirImdVSpeed += this.SetInAirImdVSpeed;
        }
Пример #16
0
    void Start()
    {
        m_characterAnim     = new CharacterAnim(gameObject);
        m_characterCollider = gameObject.GetComponent <CharacterCollider>();
        GameObject bat = CommonFunc.GetChild(gameObject, "Bat");

        m_batCollider      = CommonFunc.AddSingleComponent <CharacterCollider>(bat);
        m_characterControl = gameObject.GetComponentInChildren <CharacterControl>();
        if (m_characterControl != null)
        {
            m_characterControl.SwitchState      = Switch;
            m_characterControl.MoveEntityAction = SetMovePosition;
            m_characterControl.SetMoveEntity(gameObject);
        }

        if (m_characterAnim != null)
        {
            m_characterAnim.PlayAnim(EEntityState.Idle);
        }

        m_startPosition = transform.position;
    }
Пример #17
0
    public static void ChangeAnimation(AnimStasis stasis, int index)
    {
        CharacterAnim ca = Anims[index];

        switch (stasis)
        {
        case AnimStasis.HIT:
            ca.TempName = ca.hit; break;

        case AnimStasis.LATK: ca.TempName = ca.strongAtk; break;

        case AnimStasis.MATK: ca.TempName = ca.middleAtk; break;

        case AnimStasis.SATK: ca.TempName = ca.weakAtk; break;

        case AnimStasis.GUARD: ca.TempName = ca.guard; break;

        case AnimStasis.IDLE: ca.TempName = ca.idle; break;

        case AnimStasis.LAND: ca.TempName = ca.land; break;

        case AnimStasis.MANA: ca.TempName = ca.mana; break;

        case AnimStasis.RUSH: ca.TempName = ca.rush; break;

        case AnimStasis.SRUSH: ca.TempName = ca.slowRush; break;

        case AnimStasis.WIN: ca.TempName = ca.win; break;

        case AnimStasis.WINNING: ca.TempName = ca.winning; break;

        case AnimStasis.LOSE: ca.TempName = ca.lose; break;

        case AnimStasis.LOSING: ca.TempName = ca.losing; break;
        }
    }
 void Awake()
 {
     currentWeaponTrail = baseSkill_Trail1;
     characterAnim      = GetComponent <CharacterAnim>();
 }
Пример #19
0
    public static float GetLoseDuration(int index)
    {
        CharacterAnim ca = Anims[index];

        return(ca.SkelAnim.skeleton.data.FindAnimation("lose").duration);
    }
Пример #20
0
 // Use this for initialization
 void Start()
 {
     moveScript = sphere.GetComponent("movement") as movement;
     animScript = gameObject.GetComponent("CharacterAnim") as CharacterAnim;
     tapScript = sphere.GetComponent("touchMonitor") as touchMonitor;
        // bulletSpawn = sphere.GetComponent("bulletSpawn") as bulletSpawn;
     moveHandBone = false;
     touchMonitor.tapMonitor += tapDetected;
     angleEvent += angleMethod;
     // HANDLE THE CASE WHERE HE INSTANTIATES MULTIPLE BULLETS WHEN ANGLES R LOW...
     // USE EVENTS FOR SWIPE
     // EVENTS FOR ANIMS
 }
Пример #21
0
    //가드
    private void AddSkill_Guard(ref SkillSlot List)
    {
        CharacterStatus Orderstat;                                  //스텟받아올 변수
        Skill           guard = new Skill(Priority.GUARD, "Guard"); //우선순위 = 가드, 이름 Guard설정

        guard.PassiveCount.Add("Cost", CostData.Guard);             //패시브카운트에 "Cost"추가

        guard.ActiveSkillSet(delegate(Skill skil)
        {//사용시
            skil.GetOrder().DontDash = true;
            gameManager.ins.AnimationSetting(skil.Order, 0, CharacterAnim.AnimStasis.GUARD);
            gameManager.ins.AnimationSetting(skil.Order, 1, CharacterAnim.AnimStasis.GUARD);
            Orderstat = gameManager.ins.UserStatus[skil.Order];
            SaveData.ins.AddData(SaveData.TYPE.GUARD, Orderstat.Controller, SaveData.Try, 1);
            Orderstat.Guard      = true;
            Orderstat.AttackType = -1;
            Orderstat.CostUse((int)skil.PassiveCount["Cost"]); //코스트4
        });                                                    //액티브 스킬 사용

        guard.AddPassive(delegate(Skill skil)
        {   //맞았을떄
            Orderstat = gameManager.ins.UserStatus[skil.Order];
            if (Orderstat.Guard)
            {
                gameManager.ins.AnimationSetting(skil.Order, 1, CharacterAnim.AnimStasis.GUARD);
                SaveData.ins.AddData(SaveData.TYPE.GUARD, Orderstat.Controller, SaveData.Success, 1);
                if (Orderstat.WallDistance == 0)
                {
                    if (Random.Range(1, 10) == 1)
                    {
                        float BlockPer = 0.5f - (1 - gameManager.ins.TimingWeight[skil.Order]);
                        BlockPer       = BlockPer < 0 ? 0 : BlockPer;
                        DamageCalculator.ins.AddDamage("Multiple", BlockPer, "GuardBlock");
                    }
                }
                else
                {
                    float BlockPer = 1 - gameManager.ins.TimingWeight[skil.Order];
                    BlockPer       = BlockPer < 0 ? 0 : BlockPer;
                    DamageCalculator.ins.AddDamage("Multiple", BlockPer, "GuardBlock");
                }
            }
        }, "Hit");   //피격시 발동

        guard.AddPassive(delegate(Skill skl)
        {//체크
            Orderstat = gameManager.ins.UserStatus[skl.Order];
            if (Orderstat.Guard)
            {
                CharacterAnim.ChangeAnimation(CharacterAnim.AnimStasis.GUARD, skl.Order);
            }
        }, "Decision"); //시작시 발동
        guard.AddPassive(delegate(Skill skl)
        {               //사후처리
            skl.GetOrder().DontDash = false;
            Orderstat = gameManager.ins.UserStatus[skl.Order];
            if (Orderstat.Guard)
            {
                Orderstat.Guard = false;
            }
        }, "Start");//시작시 발동

        List.GetSlot("가드").SkillChange(guard);
    }
Пример #22
0
 // Use this for initialization
 void Start()
 {
     BulletFollowCamTransform.position = MainCameraTransform.position;
     CharacterAnim.SetBool("Walking", true);
     StartCoroutine(StopWalking());
 }
Пример #23
0
    //public Transform effect;

    private void Start()
    {
        Wonder = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterAnim>();
    }
Пример #24
0
 protected virtual void Awake()
 {
     characterStats = GetComponent <CharacterStats>();
     characterAnim  = GetComponentInChildren <CharacterAnim>();
 }
Пример #25
0
    IEnumerator GamePlay()
    {
        DashAnim[] Dashs = new DashAnim[2]; // 돌진관련 변수
        for (int i = 0; i < 2; i++)
        {
            Dashs[i] = UserStatus[i].gameObject.GetComponent <DashAnim>();// 돌진관련변수 - 초기화
        }
        InputController IControl = KeyController.GetComponent <OfflineController>();

        if (KeyController != null)
        {
            IControl = KeyController.GetComponent <OfflineController>();
            if (GameData.ins.isOnline)
            {
                Debug.Log("온라인모드");
                KeyController.GetComponent <OfflineController>().enabled = false;
                IControl = KeyController.GetComponent <OnlineController>();
            }
            else
            {
                Debug.Log("오프라인");
                KeyController.SetActive(true);
                //  KeyController.GetComponent<OnlineController>().enabled = false;
            }
        }
        WallManager.ins.SetPivot();             //벽과의 거리 설정
        yield return(new WaitForSeconds(0.1f)); // 스타트 함수 대기

        GameData.ins.InitPlayer();              // 플레이어 초기화
        for (int i = 0; i < 2; i++)
        {
            CharacterStatusSetup.SetupStat(i, (int)GameData.ins.Characters[i]);
            if (!SkillManager.ins.CharacterSkillSetup(i))
            {
                Debug.Log("에러 - 제작되지 않은 캐릭터로 초기화");
                Debug.Break();
            }
        }
        yield return(new WaitForSeconds(1f));// 게임 시작전 딜레이



        SkillManager.ins.RunPassives("GameStart");// 게임처음시작
        for (int i = 0; i < 2; i++)
        {
            UITextSet.UIList[i == 0 ? "Champion" : "Challanger" + "Potion"] = (UserSlot[i].GetSlot("아이템0").GetSkill() as StackSkill).TempStack.ToString();
        }
        while (true)// 게임시작 루프
        {
            isCounter = false;
            UIOpen    = false;
            TempStep  = STEP.START;                // 실행단계
            SkillManager.ins.RunPassives("Start"); // 시작시 패시브 발동

            CharacterAnim.ChangeAnimation(CharacterAnim.AnimStasis.RUSH);
            Dash(Dashs);                             //이동!
            yield return(new WaitForSeconds(0.25f)); //입력대기

            UIOpen   = false;
            TempStep = STEP.KEYCHECK;                 // 키확인단계
            UIMoveImage.BarMove();
            SkillManager.ins.RunPassives("KeyCheck"); //키입력시 패시브 발동
            IControl.CheckingKey();
            float[] KeyCatchTime = IControl.GetCatchTime();
            // StartCoroutine(KeyCheck());

            float AnimationTimer = 1f;
            // while (!KeyAllClick)
            while (!IControl.CheckingRunEffect())
            {
                if (AnimationTimer > 0)
                {
                    AnimationTimer -= Time.unscaledDeltaTime;
                }
                else if (AnimationTimer < 0)
                {
                    Time.timeScale = 0.05f;                    //슬로우
                    CharacterAnim.ChangeAnimation(CharacterAnim.AnimStasis.SRUSH, 5f);
                    AnimationTimer = 0;
                }
                //키체크가 끝날때까지 무한 루프
                yield return(null);
            }
            float[] TimingArr = IControl.GetCatchTime();
            for (int i = 0; i < 2; i++)
            {
                CatchTiming(TimingArr[i], i);
            }
            Time.timeScale = 1;                       //평소대로
            //판정
            TempStep = STEP.DECISION;                 // 판정단계
            SkillManager.ins.RunPassives("Decision"); //판정시 패시브 발동
            for (int i = 0; i < 2; i++)
            {
                UserStatus[i].MPProgressBar();
            }
            CheckingWinner();          //승자체크 - 이떄부터 위너 사용 가능
            GuardCheck(Dashs, Winner); //가드시 이동그만.
            //CharacterAnim.ChangeAnimation(CharacterAnim.AnimStasis.SRUSH);
            float[] Duration = { CharacterAnim.GetTempDuration(0), CharacterAnim.GetTempDuration(1) };
            yield return(new WaitForSeconds(0.25f));                               //애니메이션 딜레이

            TempStep = STEP.HITDAMAGE;                                             // 데미지피격단계
            UIOpen   = true;
            AnimationSetting(2, CharacterAnim.AnimStasis.LAND);                    //막애니메이션은 밀쳐짐.
            if (Winner == DROW || (Winner != DROW && UserStatus[Winner].DontDash)) //무승부
            {
                SkillManager.ins.RunPassives("Drow");                              //비길때 패시브 발동
                StartCoroutine(AnimationRun());
                yield return(new WaitForSeconds(0.95f));                           //애니메이션 딜레이

                for (int i = 0; i < 2; i++)
                {
                    //드로우면 서로 넉백
                    if (Mathf.Abs(UserStatus[CHAMPION].transform.position.x - UserStatus[CHALLANGER].transform.position.x) < 10)
                    {
                        AnimationSetting(1, CharacterAnim.AnimStasis.LAND);                                          //막애니메이션은 밀쳐짐.
                        Dashs[i].Knockback((WallManager.ins.DashPivotX + 50f * CharacterDirection(i)) * 0.1f, 0.5f); //서로넉백
                    }
                }
                yield return(new WaitForSeconds(0.05f));//애니메이션 딜레이
            }
            else
            {                                                             //판가름 남.
                CharacterAnim.SetOrderinLayer();
                SaveData.ins.AddData(SaveData.TYPE.STILL, Winner, 1);     //데이터 저장

                int Loser = UserStatus[Winner].Enemy();                   //패자
                AnimationSetting(Loser, 1, CharacterAnim.AnimStasis.HIT); //막애니메이션은 밀쳐짐.
                CharacterAnim.ChangeAnimation(CharacterAnim.AnimStasis.HIT, Loser);
                SkillManager.ins.RunPassives("Attack", Winner);           //승자 어택
                SkillManager.ins.RunPassives("Hit", Loser);               //데미지

                DamageCalculator.ins.AddDamage(DamageCalculator.MULTIPLE_s, TimingWeight[Winner], "RhythmWeight");
                int damage = DamageCalculator.ins.Calculate();//데미지 계산

                Debug.Log(damage + "최종 데미지");
                Debug.Log((Winner == 0 ? "챔피언" : "챌린저") + "승");

                //yield return new WaitForSeconds(CharacterAnim.GetTempDuration(Winner));//애니메이션 딜레이
                StartCoroutine(AnimationRun());
                if (damage != 0)
                {
                    StartCoroutine(WinnerAudioRun(UserSlot[Winner])); // 공격자 소리 재생
                }
                yield return(new WaitForSeconds(1f));                 //애니메이션 딜레이

                HitEffect(damage);
                UITextSet.UIList["Damage"] = damage.ToString();
                if (!UserStatus[Winner].DontDash)
                {
                    CameraController.LockPosition = true;       // 카메라 컨트롤러
                    CameraController.Winner       = Winner;     // " 위와동일
                }
                SkillManager.ins.RunPassives("WallSetting");    //벽이동 전 패시브 발동
                Shake(damage * 16);                             //지진
                UserStatus[Loser].HpDown(damage);               //HP깎고
                UITextSet.UIList["Damage"] = damage.ToString(); //최종 데미지 UI
                bool  LoserConer = UserStatus[Loser].WallDistance == 0;
                float pMove      = WallManager.ins.PivotMove;
                WallManager.ins.SetPivot();//벽과의 거리 설정
                //넉백되는구간
                float KnockPlus = 50f;
                if (pMove == 0)
                {
                    for (int i = 0; i < 2; i++)
                    {
                        Dashs[i].Knockback((WallManager.ins.DashPivotX + 50f * CharacterDirection(i)) * 0.1f, 0.5f);//서로넉백
                    }
                }
                else if (LoserConer || UserStatus[Loser].isSuperArmor)
                {
                    if (UserStatus[Loser].isSuperArmor)
                    {
                        Debug.Log("맞은사람이 슈아임.");
                    }
                    KnockPlus = 85f;
                    Dashs[Winner].Knockback(((WallManager.ins.DashPivotX + KnockPlus * CharacterDirection(Winner)) * 0.1f), 0.5f);
                }
                else
                {
                    Dashs[1 - Winner].Knockback(((WallManager.ins.DashPivotX + KnockPlus * CharacterDirection(Loser)) * 0.1f * TimingWeight[Winner]), 0.5f);
                }
            }
            TempStep = STEP.END;                 //스탭변경 - 종료
            SkillManager.ins.RunPassives("End"); ////종료

            Debug.Log("끝");
            yield return(new WaitForSeconds(1f));

            CameraController.LockPosition = false;
            Debug.Log("한바퀴");
            Turn++;
            for (int i = 0; i < 2; i++)
            {
                UserSlot[i].SelectReset();
                UserStatus[i].TurnStart();
            }
        }
    }