Пример #1
0
    // ======================================

    public void Plus_Fish_Item_Num()
    {
        ++m_Got_Fish_Item_Num;
        Score_Board_UI.GetInstance().Set_Item_Num_Text(m_Got_Fish_Item_Num);

        if (!m_is_FeverTime_On)
        {
            m_Curr_FeverTime_Point += FEVER_TIME_POINT.FISH_ITEM;
        }
    }
Пример #2
0
    public void Plus_Enemy_Kill_Num(int type)
    {
        if (!m_is_FeverTime_On) // 피버타임이 끝나야 가능.
        {
            switch (type)
            {
            case ENEMY_TYPE.SMALL:
                ++m_Small_Enemy_Kill_Num;
                Score_Board_UI.GetInstance().Set_Small_Kill_Num_Text(m_Small_Enemy_Kill_Num);
                break;

            case ENEMY_TYPE.MIDDLE:
                ++m_Middle_Enemy_Kill_Num;
                Score_Board_UI.GetInstance().Set_Middle_Kill_Num_Text(m_Middle_Enemy_Kill_Num);
                break;

            case ENEMY_TYPE.BOSS:
                ++m_Big_Enemy_Kill_Num;
                Score_Board_UI.GetInstance().Set_Big_Kill_Num_Text(m_Big_Enemy_Kill_Num);
                break;
            }
        }
    }
Пример #3
0
 void Awake()
 {
     m_Instance = this;
 }
Пример #4
0
 public void Plus_Obstacle_Destroy_Num()
 {
     ++m_Obstacle_Destroy_Num;
     Score_Board_UI.GetInstance().Set_Obstacle_Num_Text(m_Obstacle_Destroy_Num);
 }
Пример #5
0
    // ===================================


    public void Gun_Change(byte gun_type) // 총 변경 처리.
    {
        if (m_Curr_Gun_Type == gun_type)  // 같은 총을 먹었다면.
        {
            Gun_Upgrade();                // 업그레이드 실행.
        }
        else // 아니라면 변환.
        {
            m_Curr_Gun_Type = gun_type; // 현재 총기 타입 변경.

            switch (gun_type)
            {
            case GUN_TYPE.SHOTGUN:
                m_Curr_Gun_Reload_Time = GUN_RELOAD_TIME.SHOTGUN;                                           // 재장전 시간 변경.

                m_Curr_Gun_Damage              = GUN_DAMAGE.SHOTGUN;                                        // 데미지 변경.
                m_Curr_Gun_Bullet_Speed        = GUN_BULLET_SPEED.SHOTGUN;                                  // 총알 속도 변경.
                m_Curr_Gun_Knock_Back_Distance = GUN_KNOCK_BACK_DISTANCE.SHOTGUN;                           // 넉백 거리 변경.

                m_Curr_Gun_Bullet_Num_Per_One_Shot = GUN_BULLET_NUM.SHOTGUN;                                // 1회 발사 총알 개수 변경.
                m_Curr_Gun_Fire_Per_Reload         = GUN_FIRE_NUM_PER_RELOAD.SHOTGUN;                       // 1회 장전당 발사 횟수 변경.

                m_Curr_Gun_Auto_Fire_Time = GUN_AUTO_FIRE_TIME.SHOTGUN;                                     // 연사수 (시간) 변경.

                GetComponent <SpriteRenderer>().sprite = m_ShotGun_Sprite;                                  // 새 총기 스프라이트로 변경.
                GameObject.Find("Gun_Fire").GetComponent <SpriteRenderer>().sprite = m_ShotGun_Fire_Sprite; // 새 총기 불꽃 스프라이트로 변경.

                break;

            case GUN_TYPE.DSMG:
                m_Curr_Gun_Reload_Time = GUN_RELOAD_TIME.DSMG;

                m_Curr_Gun_Damage              = GUN_DAMAGE.DSMG;
                m_Curr_Gun_Bullet_Speed        = GUN_BULLET_SPEED.DSMG;
                m_Curr_Gun_Knock_Back_Distance = GUN_KNOCK_BACK_DISTANCE.DSMG;

                m_Curr_Gun_Bullet_Num_Per_One_Shot = GUN_BULLET_NUM.DSMG;
                m_Curr_Gun_Fire_Per_Reload         = GUN_FIRE_NUM_PER_RELOAD.DSMG;

                m_Curr_Gun_Auto_Fire_Time = GUN_AUTO_FIRE_TIME.DSMG;

                GetComponent <SpriteRenderer>().sprite = m_DSMG_Sprite;
                GameObject.Find("Gun_Fire").GetComponent <SpriteRenderer>().sprite = m_DSMG_Fire_Sprite;

                break;

            case GUN_TYPE.AR:
                m_Curr_Gun_Reload_Time = GUN_RELOAD_TIME.AR;

                m_Curr_Gun_Damage              = GUN_DAMAGE.AR;
                m_Curr_Gun_Bullet_Speed        = GUN_BULLET_SPEED.AR;
                m_Curr_Gun_Knock_Back_Distance = GUN_KNOCK_BACK_DISTANCE.AR;

                m_Curr_Gun_Bullet_Num_Per_One_Shot = GUN_BULLET_NUM.AR;
                m_Curr_Gun_Fire_Per_Reload         = GUN_FIRE_NUM_PER_RELOAD.AR;

                m_Curr_Gun_Auto_Fire_Time = GUN_AUTO_FIRE_TIME.AR;

                GetComponent <SpriteRenderer>().sprite = m_AR_Sprite;
                GameObject.Find("Gun_Fire").GetComponent <SpriteRenderer>().sprite = m_AR_Fire_Sprite;

                break;
            }

            m_Curr_Gun_Level          = 1;                          // 레벨 초기화.
            m_Waited_Reload_Time      = 0.0f;                       // 재장전 대기 시간 초기화.
            m_Waited_Auto_Fire_Time   = m_Curr_Gun_Auto_Fire_Time;  // 연사 시간 Full.
            m_Left_Rounds_In_Magazine = m_Curr_Gun_Fire_Per_Reload; // 남은 발사 횟수 Full.
        }

        Score_Board_UI.GetInstance().Set_Level_Text(m_Curr_Gun_Level); // UI 표시
    }