中级玩家
![Rank: 3](static/image/common/star_level2.gif) ![Rank: 3](static/image/common/star_level1.gif)
- 贡献度
- 13
- 金元
- 924
- 积分
- 144
- 精华
- 0
- 注册时间
- 2018-2-23
|
搜索ItemsManager.UpdateDebug
在private void UpdateDebug()下面添加
{
if (Input.GetKey(KeyCode.LeftControl))
{
if (Input.GetKeyDown(KeyCode.F1))
{
MenuInGameManager.Get().ShowScreen(typeof(MenuDebugItem));
return;
}
if (Input.GetKeyDown(KeyCode.F2))
{
MenuInGameManager.Get().ShowScreen(typeof(MenuDebugScenario));
return;
}
if (Input.GetKeyDown(KeyCode.F3))
{
MenuInGameManager.Get().ShowScreen(typeof(MenuDebugSpawners));
return;
}
if (Input.GetKeyDown(KeyCode.F4))
{
MenuInGameManager.Get().ShowScreen(typeof(MenuDebugSkills));
return;
}
if (Input.GetKeyDown(KeyCode.F5))
{
MenuInGameManager.Get().ShowScreen(typeof(MenuDebugAI));
return;
}
if (Input.GetKeyDown(KeyCode.F6))
{
MenuInGameManager.Get().ShowScreen(typeof(MenuDebugWounds));
return;
}
if (Input.GetKeyDown(KeyCode.F7))
{
MenuInGameManager.Get().ShowScreen(typeof(MenuDebugDialogs));
return;
}
if (Input.GetKeyDown(KeyCode.F9))
{
MenuInGameManager.Get().ShowScreen(typeof(MenuDebugLog));
return;
}
if (Input.GetKeyDown(KeyCode.F11))
{
MenuInGameManager.Get().ShowScreen(typeof(MenuDebugScenarioDialogs));
}
}
if (this.m_DebugSpawnID != ItemID.None && Input.GetKeyDown(KeyCode.I) && Input.GetKey(KeyCode.LeftControl))
{
Vector3 forward = Player.Get().GetHeadTransform().forward;
Vector3 vector = Player.Get().GetHeadTransform().position + 0.5f * forward;
RaycastHit raycastHit;
vector = (Physics.Raycast(vector, forward, out raycastHit, 3f) ? raycastHit.point : (vector + forward * 2f));
this.CreateItem(this.m_DebugSpawnID, true, vector - forward * 0.2f, Player.Get().transform.rotation);
}
if (Input.GetKeyDown(KeyCode.P))
{
this.UnlockItemInNotepad(ItemID.Logs_Bed);
}
if (Input.GetKey(KeyCode.U) && Input.GetKey(KeyCode.LeftControl))
{
this.UnlockAllItemsInNotepad();
PlayerDiseasesModule.Get().UnlockAllDiseasesInNotepad();
PlayerDiseasesModule.Get().UnlockAllDiseasesTratmentInNotepad();
PlayerDiseasesModule.Get().UnlockAllSymptomsInNotepad();
PlayerDiseasesModule.Get().UnlockAllSymptomTreatmentsInNotepad();
PlayerInjuryModule.Get().UnlockAllInjuryState();
PlayerInjuryModule.Get().UnlockAllInjuryStateTreatment();
PlayerInjuryModule.Get().UnlockAllKnownInjuries();
this.UnloackAllConsumed();
this.UnlockAllCrafted();
this.UnlockAllBoiledData();
this.UnlockAllCollected();
this.UnlockAllItemInfos();
MapTab mapTab = (MapTab)MenuNotepad.Get().m_Tabs[MenuNotepad.MenuNotepadTab.MapTab];
if (mapTab == null)
{
return;
}
mapTab.UnlockAll();
}
按左CTRL+F1/F2/F3以此类推来实现打开Debug菜单,但是经过测试物品菜单为空求大神解决下 |
|