source: binary-improvements/CoppisAdditions/src/Commands/Physics.cs@ 291

Last change on this file since 291 was 273, checked in by alloc, 9 years ago

fixes 8_10_13_1

File size: 888 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.IO;
4
5using UnityEngine;
6
7namespace CoppisAdditions.CustomCommands
8{
9 public class Physics : ConsoleCmdAbstract
10 {
11 public override string GetDescription ()
12 {
13 return "Enable / Disable Physics on blocks that you are placing/removing";
14 }
15
16 public override string GetHelp ()
17 {
18 return "Enable / Disable Physics on blocks that you are placing/removing";
19 }
20
21 public override string[] GetCommands ()
22 {
23 return new string[] { "physics", "py" };
24 }
25
26 public override void Execute (List<string> _params, CommandSenderInfo _senderInfo)
27 {
28 try {
29 GameManager.bPhysicsActive = !GameManager.bPhysicsActive;
30 SdtdConsole.Instance.Output ("Physics enabled: " + GameManager.bPhysicsActive);
31 } catch (Exception e) {
32 Log.Out ("Error in Physics.Run: " + e);
33 }
34 }
35 }
36}
Note: See TracBrowser for help on using the repository browser.