public void RegisterPawnActions( Dispatcher dispatch, CombatantActions actions ) { DebugLogConsole.AddCommand( command: "Hurt", description: "Apply damage to a Combatant", method: (string id, int amount, Vector3 push) => { dispatch(actions.Hurt(pawnID: Guid.Parse(id), amount: amount, push: push)); } ); DebugLogConsole.AddCommand( command: "Heal", description: "Heal a Combatant", method: (string id, int amount) => { dispatch(actions.Heal(pawnID: Guid.Parse(id), amount: amount)); } ); DebugLogConsole.AddCommand( command: "Launch", description: "Launch a Combatant", method: (string id, Vector3 push) => { dispatch(actions.Launch(Guid.Parse(id), push)); } ); }
public void RegisterBoardActions( Dispatcher dispatch, GetState getState, BoardActions actions ) { DebugLogConsole.AddCommand( command: "AddPawn", description: "Adds a new Pawn to the Board", method: (string prefabKey, string displayName, float cameraWeight) => { dispatch(actions.AddPawn(prefabKey, displayName, cameraWeight, GetMousePosition())); } ); DebugLogConsole.AddCommand( command: "AddCombatant", description: "Adds a Combatant Pawn to the Board", method: (string prefabKey, int health, string displayName, float cameraWeight) => { dispatch(actions.AddCombatant(prefabKey, health, displayName, cameraWeight, GetMousePosition())); } ); DebugLogConsole.AddCommand( command: "RemovePawn", description: "Removes a pawn from the board", method: (string id) => { dispatch(actions.RemovePawn(Guid.Parse(id))); } ); }
void SetupConsoleCommands() { string GetDescription(string property) { var attribute = typeof(GlobalSettings).GetProperty(property).GetCustomAttribute <DescriptionAttribute>(); return(attribute.Description); } DebugLogConsole.AddCommand("tor_blaster_automatic_reload", GetDescription("BlasterAutomaticReload"), (bool enabled) => blasterAutomaticReload = BlasterAutomaticReload = enabled); DebugLogConsole.AddCommand("tor_blaster_require_refill", GetDescription("BlasterRequireRefill"), (bool enabled) => blasterRequireRefill = BlasterRequireRefill = enabled); DebugLogConsole.AddCommand("tor_blaster_scope_resolution", GetDescription("BlasterScopeResolution"), (int x, int y) => blasterScopeResolution = BlasterScopeResolution = new int[] { x, y }); DebugLogConsole.AddCommand("tor_controls_hold_duration", GetDescription("ControlsHoldDuration"), (float duration) => controlsHoldDuration = ControlsHoldDuration = duration); DebugLogConsole.AddCommand("tor_saber_activate_on_recall", GetDescription("SaberActivateOnRecall"), (bool enabled) => saberActivateOnRecall = SaberActivateOnRecall = enabled); DebugLogConsole.AddCommand("tor_saber_deactivate_on_drop", GetDescription("SaberDeactivateOnDrop"), (bool enabled) => saberDeactivateOnDrop = SaberDeactivateOnDrop = enabled); DebugLogConsole.AddCommand("tor_saber_deactivate_on_drop_delay", GetDescription("SaberDeactivateOnDropDelay"), (float delay) => saberDeactivateOnDropDelay = SaberDeactivateOnDropDelay = delay); DebugLogConsole.AddCommand("tor_saber_deflect_assist", GetDescription("SaberDeflectAssist"), (bool enabled) => saberDeflectAssist = SaberDeflectAssist = enabled); DebugLogConsole.AddCommand("tor_saber_deflect_assist_distance", GetDescription("SaberDeflectAssistDistance"), (float distance) => saberDeflectAssistDistance = SaberDeflectAssistDistance = distance); DebugLogConsole.AddCommand("tor_saber_deflect_assist_always_return", GetDescription("SaberDeflectAssistAlwaysReturn"), (bool enabled) => saberDeflectAssistAlwaysReturn = SaberDeflectAssistAlwaysReturn = enabled); DebugLogConsole.AddCommand("tor_saber_expensive_collisions", GetDescription("SaberExpensiveCollisions"), (bool enabled) => saberExpensiveCollisions = SaberExpensiveCollisions = enabled); DebugLogConsole.AddCommand("tor_saber_expensive_collisions_min_velocity", GetDescription("SaberExpensiveCollisionsMinVelocity"), (float velocity) => saberExpensiveCollisionsMinVelocity = SaberExpensiveCollisionsMinVelocity = velocity); DebugLogConsole.AddCommand("tor_saber_npc_attack_speed", GetDescription("SaberNPCAttackSpeed"), (float speed) => saberNPCAttackSpeed = SaberNPCAttackSpeed = speed); DebugLogConsole.AddCommand("tor_saber_npc_recoil_on_parry", GetDescription("SaberNPCRecoilOnParry"), (bool enabled) => saberNPCRecoilOnParry = SaberNPCRecoilOnParry = enabled); DebugLogConsole.AddCommand("tor_saber_throw", GetDescription("SaberThrowable"), (bool enabled) => saberThrowable = SaberThrowable = enabled); DebugLogConsole.AddCommand("tor_saber_throw_min_velocity", GetDescription("SaberThrowMinVelocity"), (float velocity) => saberThrowMinVelocity = SaberThrowMinVelocity = velocity); DebugLogConsole.AddCommand("tor_saber_trail", GetDescription("SaberTrailEnabled"), (bool enabled) => saberTrailEnabled = SaberTrailEnabled = enabled); DebugLogConsole.AddCommand("tor_saber_trail_duration", GetDescription("SaberTrailDuration"), (float duration) => saberTrailDuration = SaberTrailDuration = duration); DebugLogConsole.AddCommand("tor_saber_trail_min_velocity", GetDescription("SaberTrailMinVelocity"), (float velocity) => saberTrailMinVelocity = SaberTrailMinVelocity = velocity); DebugLogConsole.AddCommand("tor_use_legacy_helmets", GetDescription("UseLegacyHelmets"), (bool enabled) => useLegacyHelmets = UseLegacyHelmets = enabled); }
void Start() { //_apiChangeUnityEventManager.AddListener(InitializeBuildingsAndRoads); DebugLogConsole.AddCommand <string>("neighbourhood.remove", "Destroys a neighbourhood", RemoveNeighbourhood); DebugLogConsole.AddCommand <string>("building.remove", "Destroys a building", RemoveBuilding); DebugLogConsole.AddCommand <string>("neighbourhood.search", "Search a neighbourhood", SearchNeighbourhood); DebugLogConsole.AddCommand <bool>("fps", "Search a neighbourhood", ShowFpsCounter); DebugLogConsole.AddCommand("barrelroll", "Let the plane do barrel rolls", ToggleBarrelRoll); }
// Start is called before the first frame update void Start() { DebugLogConsole.AddCommand <string, int>("player.additem", "", (string item, int amount) => { InterfaceManager.manager.InventorySystem.AddItem(item, amount); }); DebugLogConsole.AddCommand <string, int>("player.removeitem", "", (string item, int amount) => { InterfaceManager.manager.InventorySystem.RemoveItem(item, amount); }); }
private void Start() { DebugLogConsole.AddCommand("d-info-main", "View fps and other debug info", ToggleMainDebugInfo); DebugLogConsole.AddCommand("d-info-advanced", "View device hardware info", ToggleAdvancedDebugInfo); }