查看: 53|回复: 1

tnxp显示地图名字脚本

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

    连续签到: 3 天

    [LV.5]常住居民I

    2028

    主题

    32

    回帖

    7260

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    0
    卡币
    5184
    OK点
    16
    积分
    7260
    发表于 同元九百九十二年十一月二十八日(冬) | 显示全部楼层 |阅读模式
    [JavaScript] 纯文本查看 复制代码
    partial class Window_Ditu_name extends Window_Base
    {
        var jilu_name:String;
        var shijian_index:int;
        var map_id:int;
        var map: Map;
        var map_name:String;
        function Window_Ditu_name(map_id:int)
        {
            super(360,10,108,60);//x坐标,y坐标,窗口的宽度大小,窗口的高度大小
            this.contents = new Js_Bitmap(this.width - 32,this.height - 32);
            this.jilu_name = game._map.map_name;
            this.shijian_index = 0;
            this.map_id= map_id;
            this.map = new Map();
           refresh();
        }
        //刷新
        function refresh()
        {
            this.contents.clear();
            this.contents.font.color = normal_color();
             this.map.Load_Data("Data/" + "Map" + map_id.ToString("0000") + ".json");
            this.map_name = this.map.name;
            var a:String = this.map_name;
            var b:int = 0;
           if(a.length>=3)
           b = 0;
           else
           b= 20;
            this.contents.draw_text(15+b, -2, 128, 32, this.map_name, 0);
        }
        function update(){
        super();
        if(this.jilu_name!=game._map.map_name)
        {
        this.jilu_name=game._map.map_name;
        refresh();
        }
        if(this.visible)
        {
        this.shijian_index ++;
        }
        if(this.shijian_index >=10)//100是窗口的存在时间,60为1秒
        this.visible = false;
        }
    }
    
    天天去同能,天天有童年!
    回复 论坛版权

    使用道具 举报

    宫廷医师甲
    1个角色
  • TA的每日心情
    开心
    昨天 13:33
  • 签到天数: 77 天

    连续签到: 3 天

    [LV.6]常住居民II

    64

    主题

    20

    回帖

    2673

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    31
    卡币
    2526
    OK点
    1
    积分
    2673
    发表于 同元九百九十三年五月十七日(夏) | 显示全部楼层
    支持以下


    天天去同能,天天有童年!
    回复

    使用道具 举报

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

    本版积分规则

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

    GMT+8, 2024-5-21 15:52 , Processed in 0.047855 second(s), 49 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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