查看: 59|回复: 0

[转载发布] 八方向像素移动 优化版

[复制链接]
  • TA的每日心情
    开心
    前天 09:55
  • 签到天数: 37 天

    连续签到: 3 天

    [LV.5]常住居民I

    2028

    主题

    32

    回帖

    7260

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    0
    卡币
    5184
    OK点
    16
    积分
    7260
    发表于 同元一千年八月八日(秋) | 显示全部楼层 |阅读模式
    原脚本链接: https://rpg.blue/forum.php?mod=viewthread&tid=382432&highlight=%E5%83%8F%E7%B4%A0%E7%A7%BB%E5%8A%A8
    原作者: @Hello``Bubble



    优化内容:

    1. 修复了 某些情况下, 某(些)个事件当前没有满足出现条件的事件页,于是变量@page的值就是个nil导致报错的情况.

    2. 提高了操作灵活性, 半自动纠正移动方向. (尤其是贴着墙走时格外明显, 原版很容易出现卡墙不走的情况)

    3. 把默认的"禁止斜触发"改成了 "允许斜触发". 因为大多数情况下物品还是不要斜触发的好, 否则两个事件靠在一起时很容易一次性把两个都触发了导致bug.





    关于灵活性的提高方面, 如截图所示. 蓝色方向是玩家按键方向 (→+↑); 红色方向是系统自动纠正的移动方向.

    原版本里, 假如你右边是一堵墙时, 你按 →+↑, 它判定你有右上角无法通行后, 就会让你傻傻地站在原地.

    现在, 同样情况下, 它判定你右上角无法通行后, 会去判断你的上方和右方是否可通行, 然后把移动方向纠正向 上 或者 右. 在迷宫场景较多的游戏里, 这个改动可以大大提高移动手感. 目前测试暂时没bug

    希望这个能帮上大家~


    依旧是在Main之前新建一页帖进去即生效~

    RUBY 代码
    1. class Game_Temp
    2.   attr_accessor :rgss_move, :dir_4
    3.   #alias rgss_initialize_xxxxxxxxx initialize  默认值???
    4.   #def initialize
    5.   #  rgss_initialize_xxxxxxxxx
    6.   #  @rgss_move = false
    7.   #  @dir_4 = false
    8.   #end
    9. end
    10. class Game_Event < Game_Character
    11.   attr_reader :touch_4
    12.   alias rgss_refresh refresh
    13.   def refresh
    14.     rgss_refresh
    15.     @touch_4 = true
    16.     if list != nil
    17.       for list in@page.list
    18.       if list.code == 108or list.code == 408
    19.         if list.parameters[0] =~ /允许斜触发/
    20.           @touch_4 = false
    21.           break
    22.         end
    23.       end
    24.     end
    25.   end
    26.   end
    27. end
    28. class Game_Player < Game_Character
    29.   def x(f=nil)
    30.     return !f ? @x.to_i : @x
    31.   end
    32.   def y(f=nil)
    33.     return !f ? @y.to_i : @y
    34.   end
    35.   def to_i
    36.     @x = @x.to_iif@x.is_a?(Float)
    37.     @y = @y.to_iif@y.is_a?(Float)
    38.   end
    39.   def player_passable?(dir = @direction, px = @x, py = @y)
    40.     case dir
    41.     when8
    42.       (py - 0.5).to_i == py.to_ior(passable?(px.to_i, py.to_i, 8)and
    43.       passable?((px + 0.5).to_i, py.to_i, 8))
    44.     when2
    45.       passable?(px.to_i, py.to_i, 2)and
    46.       passable?((px + 0.5).to_i, py.to_i, 2)
    47.     when4
    48.       (px - 0.5).to_i == px.to_ior(passable?(px.to_i, py.to_i, 4)and
    49.       passable?(px.to_i, (py + 0.5).to_i, 4))
    50.     when6
    51.       passable?(px.to_i, py.to_i, 6)and
    52.       passable?(px.to_i, (py + 0.5).to_i, 6)
    53.     when1
    54.       (player_passable?(4)and player_passable?(2, @x - 0.5))or
    55.       (player_passable?(2)and player_passable?(4, @x, @y + 0.5))
    56.     when3
    57.       (player_passable?(6)and player_passable?(2, @x + 0.5))or
    58.       (player_passable?(2)and player_passable?(6, @x, @y + 0.5))
    59.     when7
    60.       (player_passable?(4)and player_passable?(8, @x - 0.5))or
    61.       (player_passable?(8)and player_passable?(4, @x, @y - 0.5))
    62.     when9
    63.       (player_passable?(6)and player_passable?(8, @x + 0.5))or
    64.       (player_passable?(8)and player_passable?(6, @x, @y - 0.5))
    65.     end
    66.   end
    67.   #--------------------------------------------------------------------------
    68.   # ● 接触事件启动判定
    69.   #--------------------------------------------------------------------------
    70.   def check_event_trigger_touch(x, y)
    71.     result = false
    72.     # 事件执行中的情况下
    73.     if$game_system.map_interpreter.running?
    74.       return result
    75.     end
    76.     # 全事件的循环
    77.     for event in$game_map.events.values
    78.       if event.touch_4
    79.         if(x - 0.5).to_i == x.to_ior
    80.           (y - 0.5).to_i == y.to_i
    81.           next
    82.         end
    83.       end
    84.       # 事件坐标与目标一致的情况下
    85.       if event.x == x.to_iand event.y == y.to_iand[1,2].include?(event.trigger)
    86.         # 跳跃中以外的情况下、启动判定是正面的事件
    87.         ifnot event.jumping? andnot event.over_trigger?
    88.           event.start
    89.           result = true
    90.         end
    91.       end
    92.     end
    93.     return result
    94.   end
    95.   def player_check_event_trigger_touch(dir)
    96.     case dir
    97.     when8
    98.       check_event_trigger_touch(@x, @y - 1)
    99.       if(@x + 0.5).to_i != @x.to_i
    100.         check_event_trigger_touch(@x + 1, @y - 1)
    101.       end
    102.     when2
    103.       check_event_trigger_touch(@x, @y + 1)
    104.       if(@x + 0.5).to_i != @x.to_i
    105.         check_event_trigger_touch(@x + 1, @y + 1)
    106.       end
    107.     when4
    108.       check_event_trigger_touch(@x - 1, @y)
    109.       if(@y + 0.5).to_i != @y.to_i
    110.         check_event_trigger_touch(@x - 1, @y + 1)
    111.       end
    112.     when6
    113.       check_event_trigger_touch(@x + 1, @y)
    114.       if(@y + 0.5).to_i != @y.to_i
    115.         check_event_trigger_touch(@x + 1, @y + 1)
    116.       end
    117.     when1
    118.       check_event_trigger_touch(@x - 1, @y + 1)
    119.       if(@x + 0.5).to_i != @x.to_i
    120.         check_event_trigger_touch(@x + 1 - 1, @y + 1)
    121.       end
    122.       check_event_trigger_touch(@x, @y + 1)
    123.       check_event_trigger_touch(@x - 1, @y)
    124.       if(@y + 0.5).to_i != @y.to_i
    125.         check_event_trigger_touch(@x - 1, @y + 1)
    126.       end
    127.     when3
    128.       check_event_trigger_touch(@x + 1, @y + 1)
    129.       if(@x + 0.5).to_i != @x.to_i
    130.         check_event_trigger_touch(@x + 2, @y + 1)
    131.       end
    132.       check_event_trigger_touch(@x, @y + 1)
    133.       check_event_trigger_touch(@x + 1, @y)
    134.       if(@y + 0.5).to_i != @y.to_i
    135.         check_event_trigger_touch(@x + 1, @y + 1)
    136.       end
    137.     when7
    138.       check_event_trigger_touch(@x - 1, @y - 1)
    139.       if(@x + 0.5).to_i != @x.to_i
    140.         check_event_trigger_touch(@x + 1 - 1, @y - 1)
    141.       end
    142.       check_event_trigger_touch(@x, @y - 1)
    143.       check_event_trigger_touch(@x - 1, @y)
    144.       if(@y + 0.5).to_i != @y.to_i
    145.         check_event_trigger_touch(@x - 1, @y - 1)
    146.       end
    147.     when9
    148.       check_event_trigger_touch(@x + 1, @y - 1)
    149.       if(@x + 0.5).to_i != @x.to_i
    150.         check_event_trigger_touch(@x + 2, @y - 1)
    151.       end
    152.       check_event_trigger_touch(@x, @y - 1)
    153.       check_event_trigger_touch(@x + 1, @y)
    154.       if(@y + 0.5).to_i != @y.to_i
    155.         check_event_trigger_touch(@x + 1, @y - 1)
    156.       end
    157.     end
    158.   end
    159.   #--------------------------------------------------------------------------
    160.   # ● 同位置的事件启动判定
    161.   #--------------------------------------------------------------------------
    162.   def check_event_trigger_here(triggers)
    163.     result = false
    164.     # 事件执行中的情况下
    165.     if$game_system.map_interpreter.running?
    166.       return result
    167.     end
    168.     # 全部事件的循环
    169.     for event in$game_map.events.values
    170.       # 事件坐标与目标一致的情况下
    171.       if triggers.include?(event.trigger)and
    172.         ((event.x == @x.to_iand event.y == @y.to_i)or
    173.         (!event.touch_4and event.x == (@x + 0.5).to_iand event.y == @y.to_i)or
    174.         (!event.touch_4and event.x == @x.to_iand event.y == (@y + 0.5).to_i))
    175.         # 跳跃中以外的情况下、启动判定是同位置的事件
    176.         ifnot event.jumping? and event.over_trigger?
    177.           event.start
    178.           result = true
    179.         end
    180.       end
    181.     end
    182.     return result
    183.   end
    184.   #--------------------------------------------------------------------------
    185.   # ● 正面事件的启动判定
    186.   #--------------------------------------------------------------------------
    187.   def check_event_trigger_there(triggers)
    188.     result = false
    189.     # 事件执行中的情况下
    190.     if$game_system.map_interpreter.running?
    191.       return result
    192.     end
    193.     # 计算正面坐标
    194.     new_x = @x + (@direction == 6 ? 1 : @direction == 4 ? -1 : 0)
    195.     new_y = @y + (@direction == 2 ? 1 : @direction == 8 ? -1 : 0)
    196.     # 全部事件的循环
    197.     for event in$game_map.events.values
    198.       if event.touch_4
    199.         if(new_x - 0.5).to_i == new_x.to_ior
    200.           (new_y - 0.5).to_i == new_y.to_i
    201.           next
    202.         end
    203.       end
    204.       # 事件坐标与目标一致的情况下
    205.       if !player_passable? and triggers.include?(event.trigger)and
    206.          ((event.x == new_x.to_iand event.y == new_y.to_i)or
    207.           (!event.touch_4and event.x == (new_x + 0.5).to_iand event.y == new_y.to_i)or
    208.           (!event.touch_4and event.x == new_x.to_iand event.y == (new_y + 0.5).to_i))
    209.         # 跳跃中以外的情况下、启动判定是正面的事件
    210.         ifnot event.jumping? andnot event.over_trigger?
    211.           event.start
    212.           result = true
    213.         end
    214.       end
    215.       nextif event.touch_4
    216.       case@direction
    217.       when2
    218.         if triggers.include?(event.trigger)and
    219.           ((event.x == @x.to_i - 1and event.y == @y.to_i + 1)or
    220.           (event.x == @x.to_i + 1and event.y == @y.to_i + 1))
    221.           # 跳跃中以外的情况下、启动判定是斜面的事件
    222.           ifnot event.jumping? andnot event.over_trigger?
    223.             event.start
    224.             result = true
    225.           end
    226.         end
    227.       when4
    228.         nextif@x.to_i != (@x + 0.5).to_i
    229.         if triggers.include?(event.trigger)and
    230.           ((event.x == @x.to_i - 1and event.y == @y.to_i - 1)or
    231.           (event.x == @x.to_i - 1and event.y == @y.to_i + 1))
    232.           # 跳跃中以外的情况下、启动判定是斜面的事件
    233.           ifnot event.jumping? andnot event.over_trigger?
    234.             event.start
    235.             result = true
    236.           end
    237.         end
    238.       when6
    239.         nextif@x.to_i != (@x + 0.5).to_i
    240.         if triggers.include?(event.trigger)and
    241.           ((event.x == @x.to_i + 1and event.y == @y.to_i - 1)or
    242.           (event.x == @x.to_i + 1and event.y == @y.to_i + 1))
    243.           # 跳跃中以外的情况下、启动判定是斜面的事件
    244.           ifnot event.jumping? andnot event.over_trigger?
    245.             event.start
    246.             result = true
    247.           end
    248.         end
    249.       when8
    250.         if triggers.include?(event.trigger)and
    251.           ((event.x == @x.to_i - 1and event.y == @y.to_i - 1)or
    252.           (event.x == @x.to_i + 1and event.y == @y.to_i - 1))
    253.           # 跳跃中以外的情况下、启动判定是斜面的事件
    254.           ifnot event.jumping? andnot event.over_trigger?
    255.             event.start
    256.             result = true
    257.           end
    258.         end
    259.       end
    260.     end
    261.     # 找不到符合条件的事件的情况下
    262.     if result == false
    263.       # 正面的元件是柜台的情况下
    264.       if$game_map.counter?(new_x, new_y)
    265.         # 计算 1 元件里侧的坐标
    266.         new_x += (@direction == 6 ? 1 : @direction == 4 ? -1 : 0)
    267.         new_y += (@direction == 2 ? 1 : @direction == 8 ? -1 : 0)
    268.         # 全事件的循环
    269.         for event in$game_map.events.values
    270.           if event.touch_4
    271.             if(new_x - 0.5).to_i == new_x.to_ior
    272.               (new_y - 0.5).to_i == new_y.to_i
    273.               next
    274.             end
    275.           end
    276.           # 事件坐标与目标一致的情况下
    277.           if triggers.include?(event.trigger)and
    278.             ((event.x == new_x.to_iand event.y == new_y.to_i)or
    279.             (!event.touch_4and event.x == (new_x + 0.5).to_iand event.y == new_y.to_i)or
    280.             (!event.touch_4and event.x == new_x.to_iand event.y == (new_y + 0.5).to_i))
    281.             # 跳跃中以外的情况下、启动判定是正面的事件
    282.             ifnot event.jumping? andnot event.over_trigger?
    283.               event.start
    284.               result = true
    285.             end
    286.           end
    287.         end
    288.       end
    289.     end
    290.     return result
    291.   end
    292.   #--------------------------------------------------------------------------
    293.   # ● 向上移动
    294.   #     turn_enabled : 本场地位置更改许可标志
    295.   #--------------------------------------------------------------------------
    296.   def move_up(turn_enabled = true)
    297.     if$game_temp.rgss_movethen
    298.       to_i ; super ; return
    299.     end
    300.     # 面向上
    301.     if turn_enabled
    302.       turn_up
    303.     end
    304.     # 可以通行的情况下
    305.     if player_passable?(8)
    306.       # 面向上
    307.       turn_up
    308.       # 更新坐标
    309.       @y -= 0.5
    310.       # 歩数増加
    311.       increase_steps
    312.     # 不能通行的情况下
    313.     else
    314.       # 接触事件的启动判定
    315.       player_check_event_trigger_touch(8)
    316.     end
    317.   end
    318.   #--------------------------------------------------------------------------
    319.   # ● 向下移动
    320.   #     turn_enabled : 本场地位置更改许可标志
    321.   #--------------------------------------------------------------------------
    322.   def move_down(turn_enabled = true)
    323.     if$game_temp.rgss_movethen
    324.       to_i ; super ; return
    325.     end
    326.     # 面向下
    327.     if turn_enabled
    328.       turn_down
    329.     end
    330.     # 可以通行的场合
    331.     if player_passable?(2)
    332.       # 面向下
    333.       turn_down
    334.       # 更新坐标
    335.       @y += 0.5
    336.       # 增加步数
    337.       increase_steps
    338.     # 不能通行的情况下
    339.     else
    340.       # 接触事件的启动判定
    341.       player_check_event_trigger_touch(2)
    342.     end
    343.   end
    344.   #--------------------------------------------------------------------------
    345.   # ● 向左移动
    346.   #     turn_enabled : 本场地位置更改许可标志
    347.   #--------------------------------------------------------------------------
    348.   def move_left(turn_enabled = true)
    349.     if$game_temp.rgss_movethen
    350.       to_i ; super ; return
    351.     end
    352.     # 面向左
    353.     if turn_enabled
    354.       turn_left
    355.     end
    356.     # 可以通行的情况下
    357.     if player_passable?(4)
    358.       # 面向左
    359.       turn_left
    360.       # 更新坐标
    361.       @x -= 0.5
    362.       # 增加步数
    363.       increase_steps
    364.     # 不能通行的情况下
    365.     else
    366.       # 接触事件的启动判定
    367.       player_check_event_trigger_touch(4)
    368.     end
    369.   end
    370.   #--------------------------------------------------------------------------
    371.   # ● 向右移动
    372.   #     turn_enabled : 本场地位置更改许可标志
    373.   #--------------------------------------------------------------------------
    374.   def move_right(turn_enabled = true)
    375.     if$game_temp.rgss_movethen
    376.       to_i ; super ; return
    377.     end
    378.     # 面向右
    379.     if turn_enabled
    380.       turn_right
    381.     end
    382.     # 可以通行的场合
    383.     if player_passable?(6)
    384.       # 面向右
    385.       turn_right
    386.       # 更新坐标
    387.       @x += 0.5
    388.       # 增加步数
    389.       increase_steps
    390.     # 不能通行的情况下
    391.     else
    392.       # 接触事件的启动判定
    393.       player_check_event_trigger_touch(6)
    394.     end
    395.   end
    396.   #--------------------------------------------------------------------------
    397.   # ● 向左下移动
    398.   #--------------------------------------------------------------------------
    399.   def move_lower_left
    400.     if$game_temp.rgss_movethen
    401.       to_i ; super ; return
    402.     end
    403.     # 没有固定面向的场合
    404.     unless@direction_fix
    405.       # 朝向是右的情况下适合的面是左面、朝向是上的情况下适合的面是下面
    406.       @direction = (@direction == 6 ? 4 : @direction == 8 ? 2 : @direction)
    407.     end
    408.     # 下→左、左→下 的通道可以通行的情况下
    409.     if player_passable?(1)
    410.       # 更新坐标
    411.       @x -= 0.5
    412.       @y += 0.5
    413.       # 增加步数
    414.       increase_steps
    415.     else
    416.       # 接触事件的启动判定
    417.       player_check_event_trigger_touch(1)
    418.       #向左或下绕路
    419.       if player_passable?(4)
    420.         move_left
    421.       elsif player_passable?(2)
    422.         move_down
    423.       end
    424.       #------------------
    425.     end
    426.   end
    427.   #--------------------------------------------------------------------------
    428.   # ● 向右下移动
    429.   #--------------------------------------------------------------------------
    430.   def move_lower_right
    431.     if$game_temp.rgss_movethen
    432.       to_i ; super ; return
    433.     end
    434.     # 没有固定面向的场合
    435.     unless@direction_fix
    436.       # 朝向是右的情况下适合的面是左面、朝向是上的情况下适合的面是下面
    437.       @direction = (@direction == 4 ? 6 : @direction == 8 ? 2 : @direction)
    438.     end
    439.     # 下→右、右→下 的通道可以通行的情况下
    440.     if player_passable?(3)
    441.       # 更新坐标
    442.       @x += 0.5
    443.       @y += 0.5
    444.       # 增加步数
    445.       increase_steps
    446.     else
    447.       # 接触事件的启动判定
    448.       player_check_event_trigger_touch(3)
    449.       #向右或下绕路
    450.       if player_passable?(6)
    451.         move_right
    452.       elsif player_passable?(2)
    453.         move_down
    454.       end
    455.       #------------------
    456.     end
    457.   end
    458.   #--------------------------------------------------------------------------
    459.   # ● 向左上移动
    460.   #--------------------------------------------------------------------------
    461.   def move_upper_left
    462.     if$game_temp.rgss_movethen
    463.       to_i ; super ; return
    464.     end
    465.     # 没有固定面向的场合
    466.     unless@direction_fix
    467.       # 朝向是右的情况下适合的面是左面、朝向是上的情况下适合的面是下面
    468.       @direction = (@direction == 6 ? 4 : @direction == 2 ? 8 : @direction)
    469.     end
    470.     # 上→左、左→上 的通道可以通行的情况下
    471.     if player_passable?(7)
    472.       # 更新坐标
    473.       @x -= 0.5
    474.       @y -= 0.5
    475.       # 增加步数
    476.       increase_steps
    477.     else
    478.       # 接触事件的启动判定
    479.       player_check_event_trigger_touch(7)
    480.       #向左或上绕路
    481.       if player_passable?(4)
    482.         move_left
    483.       elsif player_passable?(8)
    484.         move_up
    485.       end
    486.       #------------------
    487.     end
    488.   end
    489.   #--------------------------------------------------------------------------
    490.   # ● 向右上移动
    491.   #--------------------------------------------------------------------------
    492.   def move_upper_right
    493.     if$game_temp.rgss_movethen
    494.       to_i ; super ; return
    495.     end
    496.     # 没有固定面向的场合
    497.     unless@direction_fix
    498.       # 朝向是右的情况下适合的面是左面、朝向是上的情况下适合的面是下面
    499.       @direction = (@direction == 4 ? 6 : @direction == 2 ? 8 : @direction)
    500.     end
    501.     # 上→右、右→上 的通道可以通行的情况下
    502.     if player_passable?(9)
    503.       # 更新坐标
    504.       @x += 0.5
    505.       @y -= 0.5
    506.       # 增加步数
    507.       increase_steps
    508.     else
    509.       # 接触事件的启动判定
    510.       player_check_event_trigger_touch(9)
    511.       #向右或下绕路
    512.       if player_passable?(6)
    513.         move_right
    514.       elsif player_passable?(8)
    515.         move_up
    516.       end
    517.       #------------------
    518.     end
    519.   end
    520.   #--------------------------------------------------------------------------
    521.   # ● 画面更新
    522.   #--------------------------------------------------------------------------
    523.   alias rgss_update update
    524.   def update
    525.     if$game_temp.dir_4
    526.       rgss_update
    527.       return
    528.     end
    529.     # 本地变量记录移动信息
    530.     last_moving = moving?
    531.     # 移动中、事件执行中、强制移动路线中、
    532.     # 信息窗口一个也不显示的时候
    533.     unless moving? or$game_system.map_interpreter.running? or
    534.            @move_route_forcingor$game_temp.message_window_showing
    535.       # 如果方向键被按下、主角就朝那个方向移动
    536.       case Input.dir8
    537.       when1
    538.         move_lower_left
    539.       when2
    540.         move_down
    541.       when3
    542.         move_lower_right
    543.       when4
    544.         move_left
    545.       when6
    546.         move_right
    547.       when7
    548.         move_upper_left
    549.       when8
    550.         move_up
    551.       when9
    552.         move_upper_right
    553.       end
    554.     end
    555.     # 本地变量记忆坐标
    556.     last_real_x = @real_x
    557.     last_real_y = @real_y
    558.     super
    559.     # 角色向下移动、画面上的位置在中央下方的情况下
    560.     if@real_y > last_real_y and@real_y - $game_map.display_y > CENTER_Y
    561.       # 画面向下卷动
    562.       $game_map.scroll_down(@real_y - last_real_y)
    563.     end
    564.     # 角色向左移动、画面上的位置在中央左方的情况下
    565.     if@real_x < last_real_x and@real_x - $game_map.display_x < CENTER_X
    566.       # 画面向左卷动
    567.       $game_map.scroll_left(last_real_x - @real_x)
    568.     end
    569.     # 角色向右移动、画面上的位置在中央右方的情况下
    570.     if@real_x > last_real_x and@real_x - $game_map.display_x > CENTER_X
    571.       # 画面向右卷动
    572.       $game_map.scroll_right(@real_x - last_real_x)
    573.     end
    574.     # 角色向上移动、画面上的位置在中央上方的情况下
    575.     if@real_y < last_real_y and@real_y - $game_map.display_y < CENTER_Y
    576.       # 画面向上卷动
    577.       $game_map.scroll_up(last_real_y - @real_y)
    578.     end
    579.     # 不在移动中的情况下
    580.     unless moving?
    581.       # 上次主角移动中的情况
    582.       if last_moving
    583.         # 与同位置的事件接触就判定为事件启动
    584.         result = check_event_trigger_here([1,2])
    585.         # 没有可以启动的事件的情况下
    586.         if result == false
    587.           # 调试模式为 ON 并且按下 CTRL 键的情况下除外
    588.           unless$DEBUGand Input.press?(Input::CTRL)
    589.             # 遇敌计数下降
    590.             if@encounter_count > 0
    591.               @encounter_count -= 1
    592.             end
    593.           end
    594.         end
    595.       end
    596.       # 按下 C 键的情况下
    597.       if Input.trigger?(Input::C)
    598.         # 判定为同位置以及正面的事件启动
    599.         check_event_trigger_here([0])
    600.         check_event_trigger_there([0,1,2])
    601.       end
    602.     end
    603.   end
    604. end
    复制代码




                本帖来自P1论坛作者龙夫三拳tan,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址:https://rpg.blue/forum.php?mod=viewthread&tid=410504  若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 论坛版权

    使用道具 举报

    ahome_bigavatar:guest
    ahome_bigavatar:welcomelogin
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2024-5-12 01:37 , Processed in 0.049587 second(s), 42 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表