Ejemplo n.º 1
0
    private void Awake()
    {
        m_rigidbody2D               = this.GetComponent <Rigidbody2D>();
        m_animFuntion               = this.transform.Find("PlayerSpineSprite").GetComponent <PlayerAnimFuntion>();
        m_attackCollider            = NormalAttackEffect.GetComponent <AttackCollider>();
        m_characterMove             = this.GetComponent <CharacterMove>();
        m_playerState               = this.GetComponent <PlayerState>();
        m_playerInput               = this.GetComponent <PlayerInput>();
        m_playerCrowdControlManager = this.GetComponent <PlayerCrowdControlManager>();
        m_randAudioFuntion          = this.GetComponent <PlayerRandAudioFuntion>();
        m_audioFuntion              = this.GetComponent <PlayerAudioFunction>();

        m_bAttacking = false;

        m_NormalAttackDic = new Dictionary <string, AttackInfo>();

        m_NormalAttackDic.Add("attack_1", new AttackInfo(1.0f, new Vector2(2.0f, 3f)));
        m_NormalAttackDic.Add("attack_2", new AttackInfo(1.0f, new Vector2(2.0f, 3f)));
        m_NormalAttackDic.Add("attack_3_1", new AttackInfo(0.5f, new Vector2(2.0f, 5.0f)));
        m_NormalAttackDic.Add("attack_3_2", new AttackInfo(2.0f, new Vector2(2.0f, -10.0f)));
        m_NormalAttackDic.Add("attack_4", new AttackInfo(3.0f, new Vector2(2.0f, 10.0f)));
        m_NormalAttackDic.Add("attack_5", new AttackInfo(4.0f, new Vector2(10.0f, 10.0f)));

        m_NormalAttackDic.Add("air_attack_1", new AttackInfo(1.0f, new Vector2(1f, 12f)));
        m_NormalAttackDic.Add("air_attack_2", new AttackInfo(1.0f, new Vector2(1f, 12f)));
        m_NormalAttackDic.Add("air_attack_3", new AttackInfo(1.0f, new Vector2(1f, 12f)));
        m_NormalAttackDic.Add("air_attack_4", new AttackInfo(1.0f, new Vector2(5f, 12f)));

        m_NormalAttackDic.Add("attack_upper", new AttackInfo(3.0f, new Vector2(1f, 24.0f)));
        m_NormalAttackDic.Add("attack_downsmash", new AttackInfo(4.0f, new Vector2(2f, -25.0f)));
    }
Ejemplo n.º 2
0
 private void Awake()
 {
     m_playerState         = GetComponent <PlayerState>();
     m_animFuntion         = this.transform.Find("PlayerSpineSprite").GetComponent <PlayerAnimFuntion>();
     m_rigidbody2D         = this.GetComponent <Rigidbody2D>();
     m_crowdControlManager = this.GetComponent <PlayerCrowdControlManager>();
 }
Ejemplo n.º 3
0
 private void Awake()
 {
     m_playerInput    = GetComponent <PlayerInput>();
     m_controlManager = GetComponent <PlayerCrowdControlManager>();
     m_playerInfo     = GetComponent <PlayerInfo>();
     m_characterMove  = GetComponent <CharacterMove>();
     m_animFuntion    = GetComponentInChildren <PlayerAnimFuntion>();
 }
Ejemplo n.º 4
0
    public virtual void InitSkill(PlayerAnimFuntion _animFuntion, GameObject _playerObject)
    {
        level = PlayerDataManager.Inst.GetSkillLevelInfo(gameObject.name);
        SkillDataManager.SkillInfo skillInfo = SkillDataManager.Inst.GetSkillInfo(gameObject.name);
        skillName     = skillInfo.skillName;
        collisionSize = skillInfo.collisionSize;
        damageRatio   = skillInfo.damageRatio + (level * 5);
        damageForce   = skillInfo.damageForce;

        m_animFuntion         = _animFuntion;
        m_playerState         = _playerObject.GetComponent <PlayerState>();
        m_rigidbody2D         = _playerObject.GetComponent <Rigidbody2D>();
        m_crowdControlManager = _playerObject.GetComponent <PlayerCrowdControlManager>();
    }
Ejemplo n.º 5
0
    // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        if (m_rigidbody2D == null)
        {
            m_rigidbody2D = animator.transform.root.GetComponent <Rigidbody2D>();
        }

        if (m_crowdControlManager == null)
        {
            m_crowdControlManager = animator.transform.root.GetComponent <PlayerCrowdControlManager>();
        }

        m_rigidbody2D.velocity = new Vector2(0, 0);
        m_crowdControlManager.Stiffen(stiffenTime);
    }
Ejemplo n.º 6
0
 public void Start()
 {
     m_playerTransform    = GameObject.FindGameObjectWithTag("Player").transform;
     m_playerInfo         = m_playerTransform.GetComponent <CharacterInfo>();
     m_playerCrowdControl = m_playerTransform.GetComponent <PlayerCrowdControlManager>();
     m_endUI = GameObject.Find("EndUI");         //변경 해야함
     m_endUI.SetActive(false);
     m_bStageSuccess          = false;
     m_stageTime              = 0;
     m_fRewardTime            = 3.0f;
     m_stageExpBar.fillAmount = (float)(PlayerDataManager.Inst.GetPlayerData().exp) / (float)(PlayerDataManager.Inst.GetPlayerData().maxExp);
     m_stageExpText.text      = (Mathf.Round(m_stageExpBar.fillAmount * 10000) / 100).ToString();
     m_stageExpText.text     += "%";
     m_nowStageIndex          = StageDataManager.Inst.nowStage;
     m_fRewardExp             = StageDataManager.Inst.stageDataSO.MainStageData[(int)m_nowStageIndex].rewardExp;
     m_stageRewordRank        = m_rewardUI.GetComponent <StageRewordRank>();
 }