コード例 #1
0
 public override void BeginState()
 {
     base.BeginState();
     GameLib.SimpleDamageProcess(transform, _manager.Stat.AttackRange,
                                 "Player", _manager.Stat);
     Debug.Log("Damage");
 }
コード例 #2
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.transform.tag == "Stage")
        {
            Debug.Log("Tagging : " + other.gameObject.name.ToString());
            StartCoroutine(EffectPlayAndReturn(effect2));
        }

        if (other.transform.tag == "Wall")
        {
            Debug.Log("Tagging : " + other.gameObject.name.ToString());
            StartCoroutine(EffectPlayAndReturn(effect1));
        }

        if (other.transform.tag == "Player")
        {
            float damage = RirisFSMManager.Stat.damageCoefiiecient[0] * 0.01f *
                           (RirisFSMManager.Stat.Str + RirisFSMManager.Stat.addStrPerRound * GameStatus.Instance.StageLevel)
                           - PlayerFSMManager.Instance.Stat.Defense;

            var hitTarget = GameLib.SimpleDamageProcess(this.transform, 0.01f, "Player", RirisFSMManager.Stat, damage * damageType);
            Invoke("AttackSupport", 0.5f);
            dameged = true;

            Debug.Log("Tagging : " + other.gameObject.name.ToString());
            StartCoroutine(EffectPlayAndReturn(effect1));
        }
    }
コード例 #3
0
ファイル: MacBullet.cs プロジェクト: pshyeok321/DreamCatcher
    private void OnTriggerEnter(Collider other)
    {
        if (_Dameged)
        {
            return;
        }

        if (other.transform.tag == "Player")
        {
            if (_Type == MacBulletType.Normal)
            {
                float damage = mac.Stat.damageCoefiiecient[0] * 0.01f *
                               (mac.Stat.Str + mac.Stat.addStrPerRound * GameStatus.Instance.StageLevel)
                               - PlayerFSMManager.Instance.Stat.Defense;

                var hitTarget = GameLib.SimpleDamageProcess(this.transform, 0.01f, "Player", mac.Stat, damage);
                Invoke("AttackSupport", 0.5f);
                _Dameged = true;

                var sound = mac.sound.monsterSFX;
                sound.PlayMonsterSFX(this.gameObject, sound.macSmallBallHit);

                if (!_Destroy)
                {
                    _MoveEffect.SetActive(false);
                    _DestroyEffect.SetActive(true);

                    PlayEffect(_DestroyEffectParticles);
                    _Destroy = true;
                }
            }
            if (_Type == MacBulletType.Skill)
            {
                float damage = mac.Stat.damageCoefiiecient[1] * 0.01f *
                               (mac.Stat.Str + mac.Stat.addStrPerRound * GameStatus.Instance.StageLevel)
                               - PlayerFSMManager.Instance.Stat.Defense;

                var hitTarget = GameLib.SimpleDamageProcess(this.transform, 0.01f, "Player", mac.Stat, damage);
                Invoke("AttackSupport", 0.5f);
                _Dameged = true;
            }
        }

        if (other.transform.tag == "DreamPillar")
        {
            _Dameged = true;

            if (!_Destroy)
            {
                _MoveEffect.SetActive(false);
                _DestroyEffect.SetActive(true);

                PlayEffect(_DestroyEffectParticles);
                _Destroy = true;
            }
        }
    }
コード例 #4
0
    public void AttackCheck()
    {
        var hitTarget = GameLib.SimpleDamageProcess(transform, _manager.Stat.AttackRange,
                                                    "Monster", _manager.Stat);

        if (hitTarget != null)
        {
            _manager._lastAttack = hitTarget;
        }
    }
コード例 #5
0
    //캐릭터주변블러 = 맞았을때? 공격할때? 스킬쓸떄? 연구해야징
    private void OnTriggerEnter(Collider other)
    {
        if (_Dameged)
        {
            return;
        }
        if (redHat.CurrentState == RedHatState.ATTACK)
        {
            if (other.transform.tag == "Player")
            {
                float damage = redHat.Stat.damageCoefiiecient[0] * 0.01f *
                               (redHat.Stat.Str + redHat.Stat.addStrPerRound * GameStatus.Instance.StageLevel)
                               - PlayerFSMManager.Instance.Stat.Defense;

                Debug.Log(damage);

                var hitTarget = GameLib.SimpleDamageProcess(
                    this.transform, 1f, "Player", redHat.Stat, MonsterType.RedHat,
                    damage);

                Transform effectTransform =
                    MonsterEffects.Instance.redHatAttackEffect.
                    ItemSetActive(PlayerFSMManager.Instance.Anim.transform, "Effect");

                var sound = redHat.sound.monsterSFX;
                sound.PlayMonsterSFX(hitTarget.gameObject, sound.redhatAttackHit);

                effectTransform.rotation = redHat.transform.rotation;

                Invoke("AttackSupport", 0.5f);
                _Dameged = true;
            }
        }
        else if (redHat.CurrentState == RedHatState.DASH)
        {
            if (other.transform.tag == "Player")
            {
                float damage = redHat.Stat.damageCoefiiecient[1] * 0.01f *
                               (redHat.Stat.Str + redHat.Stat.addStrPerRound * GameStatus.Instance.StageLevel)
                               - PlayerFSMManager.Instance.Stat.Defense;

                var hitTarget = GameLib.SimpleDamageProcess(this.transform, 1f, "Player", redHat.Stat, damage);

                Transform effectTransform =
                    MonsterEffects.Instance.redHatSkillEffect1.
                    ItemSetActive(PlayerFSMManager.Instance.Anim.transform, "Effect");

                var sound = redHat.sound.monsterSFX;
                sound.PlayMonsterSFX(hitTarget.gameObject, sound.redhatDashHit);

                Invoke("AttackSupport", 0.5f);
                _Dameged = true;
            }
        }
    }
コード例 #6
0
    //캐릭터주변블러 = 맞았을때? 공격할때? 스킬쓸떄? 연구해야징
    private void OnTriggerEnter(Collider other)
    {
        if (_Dameged)
        {
            return;
        }
        if (Tiber.CurrentState == TiberState.ATTACK2)
        {
            if (other.transform.tag == "Player")
            {
                float damage = Tiber.Stat.damageCoefiiecient[0] * 0.01f *
                               (Tiber.Stat.Str + Tiber.Stat.addStrPerRound * GameStatus.Instance.StageLevel)
                               - PlayerFSMManager.Instance.Stat.Defense;

                var hitTarget = GameLib.SimpleDamageProcess(this.transform, 0.01f, "Player", Tiber.Stat, damage);
                Invoke("AttackSupport", 0.5f);
                _Dameged = true;

                if (!PlayerFSMManager.Instance.isDead)
                {
                    PlayerFSMManager.Instance.SetState(PlayerState.HIT2);
                }
            }
        }
        if (Tiber.CurrentState == TiberState.ATTACK3)
        {
            if (other.transform.tag == "Player")
            {
                float damage = Tiber.Stat.damageCoefiiecient[1] * 0.01f *
                               (Tiber.Stat.Str + Tiber.Stat.addStrPerRound * GameStatus.Instance.StageLevel)
                               - PlayerFSMManager.Instance.Stat.Defense;

                var hitTarget = GameLib.SimpleDamageProcess(this.transform, 0.01f, "Player", Tiber.Stat, damage);
                Invoke("AttackSupport", 0.5f);

                var sound = Tiber.sound.monsterSFX;
                sound.PlayMonsterSFX(PlayerFSMManager.Instance.gameObject, sound.tiberSpinHit);

                _Dameged = true;
            }
        }
    }
コード例 #7
0
ファイル: MS04ATTACK.cs プロジェクト: pshyeok321/projectLuda
 public void AttackCheck()
 {
     GameLib.SimpleDamageProcess(transform, _manager.Stat.AttackRange,
                                 "Player", _manager.Stat);
     Debug.Log("EMPAttack");
 }
コード例 #8
0
    private void OnTriggerEnter(Collider other)
    {
        if (_Dameged)
        {
            return;
        }

        if (GameStatus.currentGameState == CurrentGameState.Product ||
            GameStatus.currentGameState == CurrentGameState.Dead)
        {
            return;
        }

        if (riris.CurrentState == RirisState.PATTERNA)
        {
            if (other.transform.tag == "Player")
            {
                float damage = riris.Stat.damageCoefiiecient[1] * 0.01f *
                               (riris.Stat.Str + riris.Stat.addStrPerRound * GameStatus.Instance.StageLevel)
                               - PlayerFSMManager.Instance.Stat.Defense;

                CharacterStat.ProcessDamage(riris.Stat, PlayerFSMManager.Instance.Stat, damage);
                var hitTarget = GameLib.SimpleDamageProcess(this.transform, 1f, "Player", riris.Stat, 0);
                if (!PlayerFSMManager.Instance.isDead)
                {
                    PlayerFSMManager.Instance.SetState(PlayerState.HIT2);
                }

                Invoke("AttackSupport", 0.5f);
                _Dameged = true;
            }
        }
        else if (riris.CurrentState == RirisState.PATTERNB)
        {
            if (other.transform.tag == "Player")
            {
                float damage = riris.Stat.damageCoefiiecient[2] * 0.01f *
                               (riris.Stat.Str + riris.Stat.addStrPerRound * GameStatus.Instance.StageLevel)
                               - PlayerFSMManager.Instance.Stat.Defense;

                CharacterStat.ProcessDamage(riris.Stat, PlayerFSMManager.Instance.Stat, damage);
                var hitTarget = GameLib.SimpleDamageProcess(this.transform, 1f, "Player", riris.Stat, 0);
                if (!PlayerFSMManager.Instance.isDead)
                {
                    PlayerFSMManager.Instance.SetState(PlayerState.HIT2);
                }

                Invoke("AttackSupport", 0.5f);
                _Dameged = true;
            }
        }
        else if (riris.CurrentState == RirisState.PATTERND)
        {
            if (other.transform.tag == "Player")
            {
                float damage = riris.Stat.damageCoefiiecient[3] * 0.01f *
                               (riris.Stat.Str + riris.Stat.addStrPerRound * GameStatus.Instance.StageLevel)
                               - PlayerFSMManager.Instance.Stat.Defense;

                CharacterStat.ProcessDamage(riris.Stat, PlayerFSMManager.Instance.Stat, damage);
                var hitTarget = GameLib.SimpleDamageProcess(this.transform, 1f, "Player", riris.Stat, 0);
                PlayerFSMManager.Instance.SetState(PlayerState.HIT2);

                Invoke("AttackSupport", 0.5f);
                _Dameged = true;
            }
        }

        else if (riris.CurrentState == RirisState.ULTIMATE)
        {
            if (other.transform.tag == "Player")
            {
                float damage = riris.Stat.damageCoefiiecient[4] * 0.01f *
                               (riris.Stat.Str + riris.Stat.addStrPerRound * GameStatus.Instance.StageLevel)
                               - PlayerFSMManager.Instance.Stat.Defense;

                CharacterStat.ProcessDamage(riris.Stat, PlayerFSMManager.Instance.Stat, damage);
                var hitTarget = GameLib.SimpleDamageProcess(this.transform, 1f, "Player", riris.Stat, 0);
                PlayerFSMManager.Instance.SetState(PlayerState.HIT2);

                Invoke("AttackSupport", 0.5f);
                _Dameged = true;
            }
        }
    }
コード例 #9
0
 public override void AttackBehavior()
 {
     base.AttackBehavior();
     GameLib.SimpleDamageProcess(transform, _manager.Stat.AttackRange,
                                 "Player", _manager.Stat);
 }