96辅助游戏论坛 - 辅助工具|www.96fuzhu.com

 找回密码
 立即注册
查看: 3550|回复: 1

【干活】rust进游戏界面汉化源码

[复制链接]
发表于 2017-4-6 20:24 | 显示全部楼层 |阅读模式
  1. using System;
  2. using UnityEngine;
  3. //字体大小可以删了默认,颜色设置后重影最好默认。
  4. public class China
  5. {
  6.         public static global::dfRichTextLabel ServerNameLabel;

  7.         public static bool isloc;

  8.         public static void Init()
  9.         {
  10.                 global::GrossLocalization.isloc = false;
  11.                 global::dfRichTextLabel[] array = UnityEngine.Object.FindObjectsOfType(typeof(global::dfRichTextLabel)) as global::dfRichTextLabel[];
  12.                 for (int i = 0; i < array.Length; i++)

  13.                 {
  14.                         global::dfRichTextLabel dfRichTextLabel = array[i];
  15.                         if (dfRichTextLabel.Text == "play game")
  16.                         {
  17.                                 dfRichTextLabel.Color = Color.cyan;
  18.                                 dfRichTextLabel.FontSize -= 8;
  19.                                 dfRichTextLabel.Text = "开始游戏";
  20.                         }
  21.                         if (dfRichTextLabel.Text == "options")
  22.                         {
  23.                                 dfRichTextLabel.Color = Color.cyan;
  24.                                 dfRichTextLabel.FontSize -= 8;
  25.                                 dfRichTextLabel.Text = "设置游戏";
  26.                         }
  27.                         if (dfRichTextLabel.Text == "exit")
  28.                         {
  29.                                 dfRichTextLabel.Color = Color.red;
  30.                                 dfRichTextLabel.FontSize -= 7;
  31.                                 dfRichTextLabel.Text = "关闭游戏";
  32.                         }
  33.                         if (dfRichTextLabel.Text == "rust.alpha" || dfRichTextLabel.Text == "rust.legacy")
  34.                         {
  35.                                 dfRichTextLabel.Color = Color.red;
  36.                                 dfRichTextLabel.Text = "96fuzhu";//角标汉化
  37.                         }
  38.                         if (dfRichTextLabel.Text == "sound")
  39.                         {
  40.                                 dfRichTextLabel.FontSize -= 12;
  41.                                 dfRichTextLabel.Text = "声音设置";
  42.                         }
  43.                         if (dfRichTextLabel.Text == "graphics")
  44.                         {
  45.                                 dfRichTextLabel.FontSize -= 12;
  46.                                 dfRichTextLabel.Text = "图形设置";
  47.                         }
  48.                         if (dfRichTextLabel.Text == "input")
  49.                         {
  50.                                 dfRichTextLabel.FontSize -= 12;
  51.                                 dfRichTextLabel.Text = "按键设置";
  52.                         }
  53.                         if (dfRichTextLabel.Text == "loading")
  54.                         {
  55.                                 dfRichTextLabel.Color = Color.green;
  56.                                 dfRichTextLabel.FontSize -= 18;
  57.                                 dfRichTextLabel.Text = "载入中。。";
  58.                         }
  59.                         if (dfRichTextLabel.Text == "WARNING")
  60.                         {
  61.                                 dfRichTextLabel.Color = Color.red;
  62.                                 dfRichTextLabel.Text = "警告!";
  63.                         }
  64.                         if (dfRichTextLabel.Text == "p e r m a n e n t l y")
  65.                         {
  66.                                 dfRichTextLabel.Text = "永久封禁";
  67.                         }
  68.                         if (dfRichTextLabel.Text.IndexOf("server is protected") >= 0)
  69.                         {
  70.                                 dfRichTextLabel.Color = Color.red;
  71.                                 dfRichTextLabel.Text = "开挂者永久封禁,请珍惜你的账号!";
  72.                         }
  73.                 }
  74.         }

  75.         static GrossLocalization()
  76.         {
  77.         }
  78. }
复制代码

回复

使用道具 举报

发表于 2021-2-27 01:20 | 显示全部楼层
请问是在哪个位置改?
回复 支持 反对

使用道具 举报

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

本版积分规则

手机版|小黑屋|96辅助游戏论坛

GMT+8, 2024-4-27 09:22 , Processed in 0.055946 second(s), 20 queries .

Powered by Discuz! X3.4

© 2016-2023 Comsenz Inc.

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