장르변경
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
온라인 온라인스크립트 1.7 28 file 아디안 2007.02.16 5473 27
메뉴관련 RPG XP 테스트플레이 할때 '뉴게임' '콘티뉴' '슛다운' 바꾸기 [중복이면 죄송] 12 이정한 2007.03.07 4153 18
메뉴관련 폰트 바꾸기 스크립트 5 아하하 2007.12.06 2518 9
제한변경 알피지 XP 래밸 9999되개 만들기 17 조한철ㅋ 2006.01.18 3482 8
세이브 렉없는 자동세이브 스크립트. 7 샤이닉 2007.02.20 2407 8
메뉴관련 시작 메뉴 수정, 추가, 삭제하기 5 데카 2005.02.13 2687 8
이동관련 액터 줄세우기 스크립트 (50명) 2 꿈을 나는 알피지 2006.01.15 2107 7
시각적 효과 물가에 모습비치게 하기 25 file 아하하 2007.12.06 3947 6
시각적 효과 타이틀화면 나오기전 사운드아함께 로고뛰우기 예 넥슨로고 12 루비 2007.09.07 4437 6
온라인 RPG XP 온라인 스크립트 25 file 니오티 2007.02.15 6859 6
이동관련 주인공 또는 npc 그림자 18 file 루비 2007.08.06 3144 5
전투관련 게이지 확인창 스크립트 (HP/SP/EXP) 4 file 니오티 2007.02.20 3540 5
기타 아이템 보관소 스크립트 (KGC펌) 10 file ケロロ 님의 ツク-ル 2005.12.11 2673 5
기타 일어 스크립트 한글화 방법 안내 3 니오티 2007.02.01 2572 4
대화관련 문장 색 추가하기 스크립트 5 file Hermes 2008.01.09 2132 4
전투관련 콤보 스크립트 10 아하하 2007.12.05 3699 4
플레이어 8방향 스크립트(대각선모션 추가) 13 file EH양먹는소녀 2007.09.10 2559 4
장르변경 TBS 배틀(SRPG) 11 file 아디안 2007.02.27 3482 4
메뉴관련 메뉴 반투명화 스크립트 2 windshy 2007.02.15 2315 4
메뉴관련 링메뉴 스크립트 16 windshy 2007.02.03 2978 4
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