设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 946|回复: 0
打印 上一主题 下一主题

[已经过期] 如何让两段脚本 显示在左右窗口

[复制链接]

Lv4.逐梦者

梦石
0
星屑
6286
在线时间
1103 小时
注册时间
2015-8-15
帖子
658
跳转到指定楼层
1
发表于 2023-4-10 14:36:06 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
左边显示的窗口内容
[pre lang="ruby" file="左窗口"]  def manually_group_them_up#手动定义组主题
    #各种刷新
    Graphics.update
    Input.update
    @spriteset.update
    #改变画面颜色
    $game_screen.start_tone_change(Tone.new(@efs_tone_R,@efs_tone_G,@efs_tone_B), 20)
    #等待一会儿   
      
    wait_a_moment(true)

    #开启消息
    Notification.show
   
    for groups in @team_groups
    next unless groups.aviliable?
    groups.calculate_rect_size(@target_d)
      if @target_d == 4 or @target_d == 6
        if groups.get_length > @team_spawn_height or groups.get_height > @team_spawn_width
          Notification.post(groups.name+"队伍过于庞大无法手动布阵!")
          next
        end
      else
        if groups.get_length > @team_spawn_width or groups.get_height > @team_spawn_height
          Notification.post(groups.name+"队伍过于庞大无法手动布阵!")
          next
        end  
      end  
      
      #通知。邮递                      组。名称
      Notification.post("正在手动部署"+groups.name+",请选择一个一个部署地点。")
      #让用户为出生(组)选择目标
      let_user_choose_a_goal_for_spawn(groups)
      flush_map_makers #平面地图绘制器
    end
   # 取消使地图移动(@团队显示区域)
    cancel_make_map_move(@team_display_area)
   # 取消使地图移动( @efs团队生成)
    cancel_make_map_move(@efs_team_spawn)
    flush_map_makers #平面地图绘制器
    end[/pre]

右窗口显示
RUBY 代码复制
  1. def let_user_choose_a_goal_for_spawn(group)
  2.     # 演奏确定 SE
  3.     $game_system.se_play($data_system.decision_se)
  4.     #临时存储=$游戏玩家。字符名称
  5.     temp_storage = $game_player.character_name
  6.     #最终x=无
  7.     final_x = nil
  8.     #最终y=无
  9.     final_y = nil
  10.     #cp=组.队长
  11.     cp = group.captain
  12.     x = cp.x
  13.     y = cp.y
  14.    # cp.转向战斗者(cp.找到最近的敌人)
  15.     cp.turn_toward_fighter(cp.find_closest_enermy)
  16.      #$游戏玩家。字符名称=cp.字符名称
  17.      $game_player.character_name = cp.character_name
  18.      #游戏玩家。移动(X,Y)
  19.      $game_player.moveto(x,y)
  20.      #$游戏玩家。透明=错误
  21.      $game_player.transparent = false
  22.      #游戏玩家方向= cp.方向
  23.      $game_player.direction = cp.direction
  24.  
  25.       loop do #循环 do
  26.        pl = $game_player#游戏玩家
  27.       # @efs最后一个实数x=pl.实数x
  28.        @efs_last_real_x = pl.real_x
  29.       # @efs最后一个实数y=pl.实数y
  30.        @efs_last_real_y = pl.real_y
  31.        #游戏系统更新
  32.        $game_system.update
  33.  
  34.        #游戏_屏幕更新
  35.        $game_screen.update
  36.        @spriteset.update#精灵集更新
  37.        Input.update #输入更新
  38.       # _更新生成(组)的命令和输入
  39.        _update_comand_input_for_spawn(group)
  40.        Graphics.update#图形更新
  41.  
  42.         if Input.trigger?(Input::C)#如果输入触发器?(输入::C)
  43.           if if_user_can_deploy(group)#if-if用户可以部署(组)
  44.           # 演奏确定 SE
  45.           $game_system.se_play($data_system.decision_se)
  46.            #最终x=游戏玩家.x
  47.            final_x = $game_player.x
  48.            ##最终y=游戏玩家.y
  49.            final_y = $game_player.y
  50.             break
  51.           else  
  52.             $game_system.se_play($data_system.buzzer_se)
  53.  
  54.  
  55.           end #user can
  56.         end #if
  57.         if Input.trigger?(Input::B)
  58.             # 演奏取消 SE
  59.             $game_system.se_play($data_system.cancel_se)
  60.           #spawn_groups
  61.           #break
  62.         end
  63.       end #loop
  64.       #游戏玩家。透明度=真如果@玩家控制  
  65.       $game_player.transparent = true if @player_controll
  66.       #$游戏玩家。字符名称=临时存储
  67.       $game_player.character_name = temp_storage
  68.       return final_x, final_y
  69.  
  70.     end #def




1.png (156.23 KB, 下载次数: 2)

1.png
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-28 04:02

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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