장르변경
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 22078 0
공지사항 스크립트 게시판 관리자' ruby ' 입니다 ruby 2010.01.09 20725 0
공지사항 일본 스크립트/소스 공유 포럼 4 니오티 2010.01.05 22249 0
화폐단위 구분해 주는 스크립트 4 file 허걱 2010.04.13 3436 1
공통 Script 화면이 부드럽게 이동돼는 스크립트 2 ★Best갱신★ 2012.09.27 1999 0
맵관련 혹시나해서 일정키로 스크롤X 화면 부드럽게만...(스크립트를 삭제를 조금 했습니다) 호호리터엉 2012.02.13 1789 0
대화관련 한글자씩 글자 나오는거 완전판!!(오류 하나도 없음) 만원만주라 2013.07.09 2106 0
기타 한글입력기 16 file 히카루 2007.01.31 14278 1
메시지 한 글자씩 대화창에 띄웁니다. 1 file 니오티 2010.07.23 1868 0
플레이어 플레이어의 클래스 (직업) 를 표시하기 5 file windshy 2010.01.28 1728 0
메뉴관련 폰트 바꾸기 스크립트 5 아하하 2007.12.06 2518 9
전투관련 파괴효과 추천스크립트 7 file 아하하 2007.12.06 3588 1
전투관련 파괴효과 스크립트 이벤트적용 <사용법> 11 file 아하하 2007.12.06 2691 3
장르변경 턴제 전투방식(RTAB 스크립트) 3 file 루시아스 2010.01.05 1733 0
전투관련 턴제 전투방식 스크립트!!!!!!! 7 file XP 팬 2010.04.30 3329 0
전투관련 턴알 게이지바 변경 스크립트 (HP/SP) 3 file 니오티 2007.02.20 3984 2
시각적 효과 타이틀화면 나오기전 사운드아함께 로고뛰우기 예 넥슨로고 12 루비 2007.09.07 4437 6
기능추가 클리어 횟수 기록 file 허걱 2010.03.05 2117 0
전투관련 콤보 스크립트 10 아하하 2007.12.05 3699 4
플레이어 캐릭터 4 방향 움직임 개선 8 데카 2005.01.29 3156 1
이동관련 최단경로 찾아가기 4 file 허걱 2010.03.05 2107 0
메뉴관련 초기 선택창을 투명하게 만들기 9 데카 2005.01.29 2100 0
전투관련 초간단 XAS 오리지널. 1 file 호호리터엉 2011.08.04 2614 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