unity添加GM命令按钮

using com.game.vo;

using Com.Game.Module.Chat;

using System.Collections;

using System.Collections.Generic;

using UnityEditor;

using UnityEngine;


public class GM : MonoBehaviour {


    //[MenuItem("GM/super_long")]

    //static void ShowWindow()

    //{

    //    ChatMode.Instance.SendPublicMsg((byte)ChatType.World, "#super_long");

    //}

    [MenuItem("GM/1")]

    static void ShowWindow1()

    {

        ChatMode.Instance.SendPublicMsg((byte)ChatType.World, "#gold 10000000");

        ChatMode.Instance.SendPublicMsg((byte)ChatType.World, "#diam 10000000");

        ChatMode.Instance.SendPublicMsg((byte)ChatType.World, "#lvl 500");

        for (int i = 1; i <= 10; i++)

        {

            int id = 100009090 + i * 1000000 + MeVo.instance.job * 100000;

            ChatMode.Instance.SendPublicMsg((byte)ChatType.World, "#goods " + id);

        }

        ChatMode.Instance.SendPublicMsg((byte)ChatType.World, "#tk 100007");

        ChatMode.Instance.SendPublicMsg((byte)ChatType.World, "#mv 10000");

        //ChatMode.Instance.SendPublicMsg((byte)ChatType.World, "#chapter 6");

        //ChatMode.Instance.SendPublicMsg((byte)ChatType.World, "#kick");

}

[MenuItem("GM/2")]

static void ShowWindow2()

{

    ChatMode.Instance.SendPublicMsg((byte)ChatType.World, "#sc_start");


    }

[MenuItem("GM/3")]

static void ShowWindow3()

{

ChatMode.Instance.SendPublicMsg((byte)ChatType.World, "#bubble_boss");


}

}

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 12,161评论 0 10
  • About these tips(Edit: August 2016. I have revised these ...
    Francis_Rose阅读 3,579评论 0 0
  • Correctness AdapterViewChildren Summary: AdapterViews can...
    MarcusMa阅读 12,871评论 0 6
  • 一、基础知识:1、JVM、JRE和JDK的区别:JVM(Java Virtual Machine):java虚拟机...
    杀小贼阅读 7,053评论 0 4
  • 通过一个月的兴成长计划学习,自己学到了很多东西,特别是今晚韦老师的《体验式德育的实践》更是让我茅塞顿开,心灵...
    梁河1662杨开仙阅读 1,735评论 0 0