コード例 #1
0
ファイル: TalkCommand.cs プロジェクト: Morphan1/Voxalia
 public TalkCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "talk";
     Description = "Opens a chat view.";
     Arguments = "[text]";
 }
コード例 #2
0
 public QuitCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "quit";
     Description = "Quits the game.";
     Arguments = "";
 }
コード例 #3
0
ファイル: SecondaryCommand.cs プロジェクト: Morphan1/Voxalia
 public SecondaryCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "secondary";
     Description = "Makes the player attack secondarily.";
     Arguments = "";
 }
コード例 #4
0
ファイル: ItemselComand.cs プロジェクト: Morphan1/Voxalia
 public ItemselCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "itemsel";
     Description = "Selects an item to hold by the given number.";
     Arguments = "<slot number>";
 }
コード例 #5
0
ファイル: UpwardCommand.cs プロジェクト: Morphan1/Voxalia
 public UpwardCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "upward";
     Description = "Moves the player upward (jumps).";
     Arguments = "";
 }
コード例 #6
0
ファイル: QuickItemCommand.cs プロジェクト: Morphan1/Voxalia
 public QuickItemCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "quickitem";
     Description = "Switches to and uses an item by the given number.";
     Arguments = "'hold'/'throw'/'click'/'alt'/'drop' <slot number>";
 }
コード例 #7
0
ファイル: ItemDownCommand.cs プロジェクト: Morphan1/Voxalia
 public ItemdownCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "itemdown";
     Description = "Adjust the item (down version).";
     Arguments = "";
 }
コード例 #8
0
ファイル: ItemStack.cs プロジェクト: Morphan1/Voxalia
 public ItemStack(Client tclient, byte[] data)
 {
     TheClient = tclient;
     DataStream ds = new DataStream(data);
     DataReader dr = new DataReader(ds);
     Load(dr, (b) => new ItemStack(tclient, b));
 }
コード例 #9
0
ファイル: UIScreen.cs プロジェクト: Morphan1/Voxalia
 public UIScreen(Client tclient)
     : base(UIAnchor.TOP_LEFT, () => 0, () => 0, () => 0, () => 0)
 {
     TheClient = tclient;
     Width = () => Parent == null ? TheClient.Window.Width : Parent.GetWidth();
     Height = () => Parent == null ? TheClient.Window.Height : Parent.GetHeight();
 }
コード例 #10
0
 public DisconnectCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "disconnect";
     Description = "Disconnects from the server.";
     Arguments = "";
 }
コード例 #11
0
ファイル: MovedownCommand.cs プロジェクト: Morphan1/Voxalia
 public MovedownCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "movedown";
     Description = "Makes the player crouch.";
     Arguments = "";
 }
コード例 #12
0
ファイル: ItemnextCommand.cs プロジェクト: Morphan1/Voxalia
 public ItemnextCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "itemnext";
     Description = "Selects the next item.";
     Arguments = "";
 }
コード例 #13
0
ファイル: BindblockCommand.cs プロジェクト: Morphan1/Voxalia
 public BindblockCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "bindblock";
     Description = "Binds a script block to a key.";
     Arguments = "<key>";
 }
コード例 #14
0
ファイル: SoundEngine.cs プロジェクト: Morphan1/Voxalia
 public void Init(Client tclient, ClientCVar cvar)
 {
     if (Context != null)
     {
         Context.Dispose();
     }
     TheClient = tclient;
     CVars = cvar;
     Context = new AudioContext(AudioContext.DefaultDevice, 0, 0, false, true);
     Context.MakeCurrent();
     try
     {
         if (Microphone != null)
         {
             Microphone.StopEcho();
         }
         Microphone = new MicrophoneHandler(this);
     }
     catch (Exception ex)
     {
         SysConsole.Output("Loading microphone handling", ex);
     }
     if (Effects != null)
     {
         foreach (SoundEffect sfx in Effects.Values)
         {
             sfx.Internal = -2;
         }
     }
     Effects = new Dictionary<string, SoundEffect>();
     PlayingNow = new List<ActiveSound>();
     Noise = LoadSound(new DataStream(Convert.FromBase64String(NoiseDefault.NoiseB64)), "noise");
 }
コード例 #15
0
ファイル: ReloadGameCommand.cs プロジェクト: Morphan1/Voxalia
 public ReloadGameCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "reloadgame";
     Description = "Reloads all or part of the game.";
     Arguments = "<chunks/screen/shaders/audio/textures/all>"; // TODO: List input?
 }
コード例 #16
0
ファイル: AttackCommand.cs プロジェクト: Morphan1/Voxalia
 public AttackCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "attack";
     Description = "Makes the player attack.";
     Arguments = "";
 }
コード例 #17
0
ファイル: NetusageCommand.cs プロジェクト: Morphan1/Voxalia
 public NetusageCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "netusage";
     Description = "Shows information on network usage.";
     Arguments = "";
 }
コード例 #18
0
ファイル: RightwardCommand.cs プロジェクト: Morphan1/Voxalia
 public RightwardCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "rightward";
     Description = "Moves the player rightward.";
     Arguments = "";
 }
コード例 #19
0
ファイル: CdevelCommand.cs プロジェクト: Morphan1/Voxalia
 public CdevelCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "cdevel";
     Description = "Clientside developmental commands.";
     Arguments = "";
 }
コード例 #20
0
 public ConnectCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "connect";
     Description = "Connects to a server.";
     Arguments = "<ip> <port>";
 }
コード例 #21
0
ファイル: ItemprevCommand.cs プロジェクト: Morphan1/Voxalia
 public ItemprevCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "itemprev";
     Description = "Selects the previous item.";
     Arguments = "";
 }
コード例 #22
0
ファイル: SprintCommand.cs プロジェクト: Morphan1/Voxalia
 public SprintCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "sprint";
     Description = "Makes the player sprint.";
     Arguments = "";
 }
コード例 #23
0
ファイル: TesteffectCommand.cs プロジェクト: Morphan1/Voxalia
 public TesteffectCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "testeffect";
     Description = "Quick-tests a particle effect, clientside.";
     Arguments = "effect";
 }
コード例 #24
0
ファイル: PlayCommand.cs プロジェクト: Morphan1/Voxalia
 public PlayCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "play";
     Description = "Plays a sound effect.";
     Arguments = "<soundname> [pitch] [volume] [location] [seek time in seconds]";
 }
コード例 #25
0
ファイル: ItemLeftCommand.cs プロジェクト: Morphan1/Voxalia
 public ItemleftCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "itemleft";
     Description = "Adjust the item (left version).";
     Arguments = "";
 }
コード例 #26
0
ファイル: WalkCommand.cs プロジェクト: Morphan1/Voxalia
 public WalkCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "walk";
     Description = "Makes the player walk.";
     Arguments = "";
 }
コード例 #27
0
ファイル: PingCommand.cs プロジェクト: Morphan1/Voxalia
 public PingCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "ping";
     Description = "Pings a a server.";
     Arguments = "<ip> <port>";
 }
コード例 #28
0
ファイル: InventoryCommand.cs プロジェクト: Morphan1/Voxalia
 public InventoryCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "inventory";
     Description = "Opens the inventory screen.";
     Arguments = "";
 }
コード例 #29
0
ファイル: BackwardCommand.cs プロジェクト: Morphan1/Voxalia
 public BackwardCommand(Client tclient)
 {
     TheClient = tclient;
     Name = "backward";
     Description = "Moves the player backward.";
     Arguments = "";
 }
コード例 #30
0
ファイル: ClientCommands.cs プロジェクト: Morphan1/Voxalia
        /// <summary>
        /// Prepares the command system, registering all base commands.
        /// </summary>
        public void Init(Outputter _output, Client tclient)
        {
            // General Init
            TheClient = tclient;
            CommandSystem = new Commands();
            Output = _output;
            CommandSystem.Output = Output;
            CommandSystem.Init();

            // UI Commands
            CommandSystem.RegisterCommand(new AttackCommand(TheClient));
            CommandSystem.RegisterCommand(new BackwardCommand(TheClient));
            CommandSystem.RegisterCommand(new BindblockCommand(TheClient));
            CommandSystem.RegisterCommand(new BindCommand(TheClient));
            CommandSystem.RegisterCommand(new ForwardCommand(TheClient));
            CommandSystem.RegisterCommand(new ItemdownCommand(TheClient));
            CommandSystem.RegisterCommand(new ItemleftCommand(TheClient));
            CommandSystem.RegisterCommand(new ItemrightCommand(TheClient));
            CommandSystem.RegisterCommand(new ItemupCommand(TheClient));
            CommandSystem.RegisterCommand(new LeftwardCommand(TheClient));
            CommandSystem.RegisterCommand(new MovedownCommand(TheClient));
            CommandSystem.RegisterCommand(new RightwardCommand(TheClient));
            CommandSystem.RegisterCommand(new SecondaryCommand(TheClient));
            CommandSystem.RegisterCommand(new SprintCommand(TheClient));
            CommandSystem.RegisterCommand(new TalkCommand(TheClient));
            CommandSystem.RegisterCommand(new UnbindCommand(TheClient));
            CommandSystem.RegisterCommand(new UpwardCommand(TheClient));
            CommandSystem.RegisterCommand(new UseCommand(TheClient));
            CommandSystem.RegisterCommand(new WalkCommand(TheClient));

            // Common Commands
            CommandSystem.RegisterCommand(new CdevelCommand(TheClient));
            CommandSystem.RegisterCommand(new ItemnextCommand(TheClient));
            CommandSystem.RegisterCommand(new ItemprevCommand(TheClient));
            CommandSystem.RegisterCommand(new ItemselCommand(TheClient));
            CommandSystem.RegisterCommand(new PlayCommand(TheClient));
            CommandSystem.RegisterCommand(new QuickItemCommand(TheClient));
            CommandSystem.RegisterCommand(new QuitCommand(TheClient));
            CommandSystem.RegisterCommand(new ReloadGameCommand(TheClient));

            // Network Commands
            CommandSystem.RegisterCommand(new ConnectCommand(TheClient));
            CommandSystem.RegisterCommand(new DisconnectCommand(TheClient));
            CommandSystem.RegisterCommand(new NetusageCommand(TheClient));
            CommandSystem.RegisterCommand(new PingCommand(TheClient));
            CommandSystem.RegisterCommand(new StartlocalserverCommand(TheClient));

            // Game Commands
            CommandSystem.RegisterCommand(new InventoryCommand(TheClient));
            CommandSystem.RegisterCommand(new TesteffectCommand(TheClient));

            // General Tags
            CommandSystem.TagSystem.Register(new AudioTagBase(TheClient));

            // Entity Tags
            CommandSystem.TagSystem.Register(new PlayerTagBase(TheClient));

            CommandSystem.PostInit();
        }