예제 #1
0
        public override void OnLoad()
        {
            GameObject go  = new GameObject("Camera Tracking Mod");
            ChewChew   chw = go.AddComponent <ChewChew>();

            StatMaster.DontDestroyOnLoad(go);
            ButtonBalls.INNIT(chw);
        }
        public static void INNIT(ChewChew yumyum)
        {
            GameObject          broadCast = new GameObject("MousePosBroadCaster");
            MouseRayBroadCaster 广播者       = broadCast.AddComponent <MouseRayBroadCaster>();

            yumyumyum = yumyum;
            GameObject ShowUpAll = GameObject.CreatePrimitive(PrimitiveType.Sphere);

            StatMaster.DontDestroyOnLoad(ShowUpAll);
            ShowUpAlll = ShowUpAll.AddComponent <ClickButtonBall>();
            UpdateEvent EUSUA = new UpdateEvent(ShowThemAll);

            ShowUpAlll.SetUp(Color.red, Color.white, true, false, "Show Camera \n Tracking Menu", EUSUA, new Vector3(0, 40, 35), new Vector3(0, 40, -15));
            ShowUpAlll.Show();
            广播者.AddMeIn(ShowUpAlll);



            GameObject SetTriggerKey = GameObject.CreatePrimitive(PrimitiveType.Cube);

            StatMaster.DontDestroyOnLoad(SetTriggerKey);
            TriggerSetter = SetTriggerKey.AddComponent <KeyAssignButtonBall>();
            UpdateEvent EUTS = new UpdateEvent(UpdateKey);

            TriggerSetter.SetUp(Color.cyan, Color.red, KeyCode.RightAlt, "Key For \nTracking: {0}", EUTS, new Vector3(20, 40, 15), new Vector3(120, 120, -150));
            广播者.AddMeIn(TriggerSetter);


            GameObject SetOffKey = GameObject.CreatePrimitive(PrimitiveType.Cube);

            StatMaster.DontDestroyOnLoad(SetOffKey);
            TriggerOffSetter = SetOffKey.AddComponent <KeyAssignButtonBall>();
            UpdateEvent EUTOS = new UpdateEvent(UpdateOffKey);

            TriggerOffSetter.SetUp(Color.cyan, Color.red, KeyCode.Mouse1, "Key For Disable\nTracking: {0}", EUTOS, new Vector3(40, 40, 15), new Vector3(120, 130, -150));
            广播者.AddMeIn(TriggerOffSetter);



            GameObject ActivationRangeBall = GameObject.CreatePrimitive(PrimitiveType.Capsule);

            StatMaster.DontDestroyOnLoad(ActivationRangeBall);
            ActivationRange = ActivationRangeBall.AddComponent <SliderButtonBall>();
            UpdateEvent EUAR = new UpdateEvent(UpdateActivationRange);

            ActivationRange.SetUp(1, 100, 35, 0.1f, "Track when target \nat {0}% on the screen", EUAR, new Vector3(15, 60, 25), new Vector3(120, 140, -150));
            广播者.AddMeIn(ActivationRange);
        }