Rev | Line | |
---|
[273] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.IO;
|
---|
| 4 |
|
---|
| 5 | using UnityEngine;
|
---|
| 6 |
|
---|
| 7 | namespace 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.