장르변경
2012.01.24 00:44

2D 로 가는길! 횡스크롤 이닷!

조회 수 2045 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
Extra Form

#########################
#########################
#==============================================================================
# □ 커스터마이즈 포인트
#==============================================================================
class XRXS50
  #
  # Action-Maps 를 가동시키는 맵 ID의 배열
  #
  ENABLE_FULL_ACTY_MAPS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  #
  # 「기울기 강하」
  #
  ENABLE_SLIDE_DESCENT = true
  #
  # 방향 점프(true=진실한  : 향하고 있을 방향에 점프。
  #              false=틀린 : 키가 밀리고 있을 방향에 점프。)
  #
  JUMP_AS_KEY = false
end
#==============================================================================
# ■ Game_Player
#==============================================================================
class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # ○ 공개 인스턴스 변수
  #--------------------------------------------------------------------------
  # 기존
  attr_writer   :direction_fix
  attr_accessor :walk_anime
  # 신규
  attr_accessor :now_jumps
  attr_writer   :xrxs50_direction_sidefix
  #--------------------------------------------------------------------------
  # ○최대 점프 회수
  #--------------------------------------------------------------------------
  def max_jumps
    return 1
  end
  #--------------------------------------------------------------------------
  # ● 왼쪽을 향한다
  #--------------------------------------------------------------------------
  alias xrxs50_turn_left turn_left
  def turn_left
    if @xrxs50_direction_sidefix
      @direction = 4
    else
      xrxs50_turn_left
    end
  end
  #--------------------------------------------------------------------------
  # ● 오른쪽을 향한다
  #--------------------------------------------------------------------------
  alias xrxs50_turn_right turn_right
  def turn_right
    if @xrxs50_direction_sidefix
      @direction = 6
    else
      xrxs50_turn_right
    end
  end
end
#==============================================================================
# ■ Scene_Map
#==============================================================================
class Scene_Map
  #--------------------------------------------------------------------------
  # ● 메인 처리
  #--------------------------------------------------------------------------
  alias xrxs50_main main
  def main
    # 체크
    xrxs50_enable_check
    # 귀환시킨다
    xrxs50_main
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  alias xrxs50_update update
  def update
    # 귀환시킨다
    xrxs50_update
    # 프레임 갱신 (좌표계 갱신)
    if @xrxs50_enable
      update_coordinates
    end
  end
  #--------------------------------------------------------------------------
  # ○ 프레임 갱신 (좌표계 갱신)
  #--------------------------------------------------------------------------
  def update_coordinates
    if $game_player.passable?($game_player.x,$game_player.y,2)
      unless $game_player.moving?
        if XRXS50::ENABLE_SLIDE_DESCENT and
           Input.press?(Input::RIGHT) and
           $game_player.passable?($game_player.x,$game_player.y+1,6)
          $game_player.move_lower_right
        elsif XRXS50::ENABLE_SLIDE_DESCENT and
              Input.press?(Input::LEFT) and
              $game_player.passable?($game_player.x,$game_player.y+1,4)
          $game_player.move_lower_left
        else
          $game_player.move_down
        end
      end
    else
      $game_player.move_down
      $game_player.walk_anime = true unless $game_player.walk_anime
      $game_player.now_jumps  = 0
      if Input.trigger?(Input::X) and
         $game_player.now_jumps < $game_player.max_jumps
        if XRXS50::JUMP_AS_KEY
          direction = $game_player.direction == 4 ? -1 : 1
        else
          if Input.press?(Input::RIGHT)
            direction = 1
          elsif Input.press?(Input::LEFT)
            direction = -1
          else
            direction = 0
          end
        end
        $game_player.jump(direction, -3)
        $game_player.now_jumps += 1
        $game_player.walk_anime = false
      end
    end
  end
  #--------------------------------------------------------------------------
  # ●  플레이어의 장소 이동
  #--------------------------------------------------------------------------
  alias xrxs50_transfer_player transfer_player
  def transfer_player
    # 귀환시킨다
    xrxs50_transfer_player
    # 체크
    xrxs50_enable_check
  end
  #--------------------------------------------------------------------------
  # ○ XRXS50 하지만 가동할까 판정
  #--------------------------------------------------------------------------
  def xrxs50_enable_check
    if XRXS50::ENABLE_FULL_ACTY_MAPS.include?($game_map.map_id)
      $game_player.now_jumps = 0 if $game_player.now_jumps.nil?
      @xrxs50_enable = true
      $game_player.direction_fix = true
      $game_player.xrxs50_direction_sidefix = true
    else
      @xrxs50_enable = false
      $game_player.direction_fix = false
      $game_player.xrxs50_direction_sidefix = false
    end
  end
end
#점프키 a

 

 

 

하아~  점프 구현 됨. 점프키 A

 

XP용입니다.


List of Articles
분류 제목 글쓴이 날짜 조회 수 추천 수
공지사항 일본어 스크립트를 번역하기 좋은 번역사이트 두곳입니다 ruby 2010.01.09 22074 0
공지사항 스크립트 게시판 관리자' ruby ' 입니다 ruby 2010.01.09 20725 0
공지사항 일본 스크립트/소스 공유 포럼 4 니오티 2010.01.05 22249 0
대화관련 한글자씩 글자 나오는거 완전판!!(오류 하나도 없음) 만원만주라 2013.07.09 2106 0
전투관련 누구나 쉽게 만드는 액션알피지 6 펜릴 2012.11.25 4344 0
공통 Script 화면이 부드럽게 이동돼는 스크립트 2 ★Best갱신★ 2012.09.27 1999 0
맵관련 혹시나해서 일정키로 스크롤X 화면 부드럽게만...(스크립트를 삭제를 조금 했습니다) 호호리터엉 2012.02.13 1789 0
장르변경 2D 로 가는길! 횡스크롤 이닷! 공냑군 2012.01.24 2045 0
기타 게이지바 스크립트!! 최고!! 12 file 코아 코스튬 2011.08.08 4236 0
대화관련 대화 창에 얼굴 넣기 스크립트 4 file 노르 2011.08.08 3432 0
맵관련 조금 다른 맵표시 스크립트 file 노르 2011.08.08 1886 0
시각적 효과 NPC 위에 이름표시 하기 스크립트 2 file 노르 2011.08.08 2477 0
전투관련 초간단 XAS 오리지널. 1 file 호호리터엉 2011.08.04 2614 0
스킬관련 전투 비슷??????????? 아오오오오옹니 2011.07.29 1844 0
기능추가 전체키 스크립트 8 닉네임이없습니다 2011.07.19 2212 0
기타 이름입력 스크립트 2 닉네임이없습니다 2011.07.16 2207 0
맵관련 맵이름 띄우기 (오류없이 진짜나옵니다) 6 지나가던개 2011.07.06 2244 0
메뉴관련 간단한 링 메뉴 스크립트(처음올리는 스크립트) 1 lts1503 2011.05.22 2171 0
온라인 이것은약간온라인이랑섞인듯? 어쨋든 클릭스크립트!! 2 file 호호리터엉 2011.02.23 2218 0
맵관련 W키눌러서 미니맵표시 12 호호리터엉 2011.01.22 2760 1
맵관련 Shift키누르고 방향키누르면 화면스크롤되는것 7 file 호호리터엉 2011.01.21 2581 0
맵관련 맵이름 띄우기, 케릭터 ID띄우기 15 file 꼬마쟁이 2011.01.05 7387 0
기타 중복일것 같은데;; [한글 이름 입력] 1 꼬마쟁이 2011.01.05 4641 0
Board Pagination Prev 1 2 3 4 5 6 7 Next
/ 7

Copyright ⓒ Nioting All Rights Reserved. (since 1999)    개인정보
        

Fatal error: Cannot access property sessionController::$lifetime in /web/old/xe/modules/session/session.controller.php on line 45