示例#1
0
    private void OnCurrentActorUpdated()
    {
        if (currentActor == null)
        {
            return;
        }
        Camera.main.GetComponent <CameraFollow360>().player = currentActor.transform;
        if (beautifySettings)
        {
            beautifySettings.depthOfFieldTarget = currentActor.transform;
        }

        // TODO: Refactor
        jumpCommand        = new JumpCommand(currentActor);
        kickCommand        = new KickCommand(currentActor);
        punchCommand       = new PunchCommand(currentActor);
        moveForwardCommand = new MoveForwardCommand(currentActor);
    }
示例#2
0
        private static void InitializeCommands()
        {
            ChatCommand.AddCommand("/about", new AboutCommand());
            ChatCommand.AddCommand("/addfriend", new AddFriendCommand());
            AddAdminCommand command = new AddAdminCommand();

            command.AdminFlags = "CanAddAdmin";
            ChatCommand.AddCommand("/addadmin", command);
            AddFlagCommand command2 = new AddFlagCommand();

            command2.AdminFlags = "CanAddFlags";
            ChatCommand.AddCommand("/addflag", command2);
            AnnounceCommand command3 = new AnnounceCommand();

            command3.AdminFlags = "CanAnnounce";
            ChatCommand.AddCommand("/announce", command3);
            BanCommand command4 = new BanCommand();

            command4.AdminFlags = "CanBan";
            ChatCommand.AddCommand("/ban", command4);
            ChatCommand.AddCommand("/friends", new FriendsCommand());
            GetFlagsCommand command5 = new GetFlagsCommand();

            command5.AdminFlags = "CanGetFlags";
            ChatCommand.AddCommand("/getflags", command5);
            GiveItemCommand command6 = new GiveItemCommand();

            command6.AdminFlags = "CanGiveItem";
            ChatCommand.AddCommand("/give", command6);
            GodModeCommand command7 = new GodModeCommand();

            command7.AdminFlags = "CanGodMode";
            ChatCommand.AddCommand("/god", command7);
            ChatCommand.AddCommand("/help", new HelpCommand());
            ChatCommand.AddCommand("/history", new HistoryCommand());
            SpawnItemCommand command8 = new SpawnItemCommand();

            command8.AdminFlags = "CanSpawnItem";
            ChatCommand.AddCommand("/i", command8);
            InstaKOCommand command9 = new InstaKOCommand();

            command9.AdminFlags = "CanInstaKO";
            ChatCommand.AddCommand("/instako", command9);
            KickCommand command10 = new KickCommand();

            command10.AdminFlags = "CanKick";
            ChatCommand.AddCommand("/kick", command10);
            KillCommand command11 = new KillCommand();

            command11.AdminFlags = "CanKill";
            ChatCommand.AddCommand("/kill", command11);
            LoadoutCommand command12 = new LoadoutCommand();

            command12.AdminFlags = "CanLoadout";
            ChatCommand.AddCommand("/loadout", command12);
            ChatCommand.AddCommand("/motd", new MOTDCommand());
            MuteCommand command13 = new MuteCommand();

            command13.AdminFlags = "CanMute";
            ChatCommand.AddCommand("/mute", command13);
            ChatCommand.AddCommand("/location", new LocationCommand());
            ChatCommand.AddCommand("/ping", new PingCommand());
            ChatCommand.AddCommand("/players", new PlayersCommand());
            ChatCommand.AddCommand("/pm", new PrivateMessagesCommand());
            ReloadCommand command14 = new ReloadCommand();

            command14.AdminFlags = "CanReload";
            ChatCommand.AddCommand("/reload", command14);
            RemoveAdminCommand command15 = new RemoveAdminCommand();

            command15.AdminFlags = "CanDeleteAdmin";
            ChatCommand.AddCommand("/unadmin", command15);
            ChatCommand.AddCommand("/r", new ReplyCommand());
            ChatCommand.AddCommand("/rules", new RulesCommand());
            SaveAllCommand command16 = new SaveAllCommand();

            command16.AdminFlags = "CanSaveAll";
            ChatCommand.AddCommand("/saveall", command16);
            MasterAdminCommand command17 = new MasterAdminCommand();

            command17.AdminFlags = "RCON";
            ChatCommand.AddCommand("/setmasteradmin", command17);
            ChatCommand.AddCommand("/share", new ShareCommand());
            ChatCommand.AddCommand("/starter", new StarterCommand());
            TeleportHereCommand command18 = new TeleportHereCommand();

            command18.AdminFlags = "CanTeleport";
            ChatCommand.AddCommand("/tphere", command18);
            TeleportToCommand command19 = new TeleportToCommand();

            command19.AdminFlags = "CanTeleport";
            ChatCommand.AddCommand("/tpto", command19);
            UnbanCommand command20 = new UnbanCommand();

            command20.AdminFlags = "CanUnban";
            ChatCommand.AddCommand("/unban", command20);
            ChatCommand.AddCommand("/unfriend", new UnfriendCommand());
            RemoveFlagsCommand command21 = new RemoveFlagsCommand();

            command21.AdminFlags = "CanUnflag";
            ChatCommand.AddCommand("/unflag", command21);
            UnmuteCommand command22 = new UnmuteCommand();

            command22.AdminFlags = "CanUnmute";
            ChatCommand.AddCommand("/unmute", command22);
            ChatCommand.AddCommand("/unshare", new UnshareCommand());
            WhiteListAddCommand command23 = new WhiteListAddCommand();

            command23.AdminFlags = "CanWhiteList";
            ChatCommand.AddCommand("/addwl", command23);
            ShutDownCommand command24 = new ShutDownCommand();

            command24.AdminFlags = "CanShutdown";
            ChatCommand.AddCommand("/shutdown", command24);
            InstaKOAllCommand command25 = new InstaKOAllCommand();

            command25.AdminFlags = "CanInstaKOAll";
            ChatCommand.AddCommand("/instakoall", command25);
        }
示例#3
0
        private void RelayKickCommand(object sender, KickCommand e)
        {
            string msg = string.Format("[{0}] * {1} has kicked {2} ({3})", e.Channel, Bot.IRC.Nickname, e.Nick, e.Reason);

            ProcessRelay(e.Channel, RelayType.Kick, msg);
        }