//確認完成 void OnCheckDone() { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "注視" + this.gameObject.name + "確認完成 ")); }
public void OnDisappear() { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "主角離開" + this.gameObject.name + "視線")); }
//離開視野 void OnChangeToExitLook() { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, this.gameObject.name + "消失了")); }
public void OnFind() { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, this.gameObject.name + "發現主角")); }
//離開注視 void OnChangeToExitForceLook() { ChangeColor(); DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "離開注視" + this.gameObject.name)); }
public void DoPortal(GameObject passengerGo, Vector3 toPos) { if (passengerGo == null || toPos == null) { return; } passengerGo.transform.position = toPos; DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, passengerGo.name + "傳送到座標" + toPos)); }
// Update is called once per frame void Update() { if (Input.GetKey(KeyCode.N) || Input.GetKey(KeyCode.Joystick1Button6)) { if (Input.GetKeyDown(KeyCode.F1)) { Agent.SetDestination(TargetPos); } else if (Input.GetKeyDown(KeyCode.KeypadPlus) || Input.GetKeyDown(KeyCode.Joystick1Button5)) { //前進到下個目的地 GoNextPoint(); } else if (Input.GetKeyDown(KeyCode.KeypadMinus) || Input.GetKeyDown(KeyCode.Joystick1Button4)) { //回到上個目的地 GoPreviousPoint(); } else if (Input.GetKeyDown(KeyCode.Mouse0)) { Agent.SetDestination(GetMouseDownPos()); } if (Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.Joystick1Button8)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, gameObject.name + "停止移動")); Agent.Stop(); } else if (Input.GetKeyDown(KeyCode.R) || Input.GetKeyDown(KeyCode.Joystick1Button9)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, gameObject.name + "繼續移動")); Agent.Resume(); } } GamePadMove(); //Debug.Log("玩家自動搜尋路徑狀態" + Agent.pathStatus); }
public void GoPreviousPoint() { if (Targets.Count > 0) { if (ToTargetsIndex >= Targets.Count) { ToTargetsIndex = 0; } DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, gameObject.name + "回到(編號" + ToTargetsIndex + ") " + Targets[ToTargetsIndex])); Agent.SetDestination(Targets[ToTargetsIndex]); ToTargetsIndex++; } }
void FixedUpdate() { Move(); if ((Input.GetKeyDown(KeyCode.Joystick1Button1) && Input.GetKey(KeyCode.Joystick1Button7)) || Input.GetKeyDown(KeyCode.Space)) { onJump = true; DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "跳")); } Jump(); Fall(); if ((Input.GetKeyDown(KeyCode.Joystick1Button8) && Input.GetKey(KeyCode.Joystick1Button7)) || Input.GetKeyDown(KeyCode.R)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "重設視野中新點")); Cardboard.SDK.Recenter(); } }
//顯示輸入資訊 void LogKeyInputInfo() { if (Input.GetKeyDown(KeyCode.Joystick1Button0)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "Joystick1Button0")); } if (Input.GetKeyDown(KeyCode.Joystick1Button1)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "Joystick1Button1")); } if (Input.GetKeyDown(KeyCode.Joystick1Button2)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "Joystick1Button2")); } if (Input.GetKeyDown(KeyCode.Joystick1Button3)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "Joystick1Button3")); } if (Input.GetKeyDown(KeyCode.Joystick1Button4)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "Joystick1Button4")); } if (Input.GetKeyDown(KeyCode.Joystick1Button5)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "Joystick1Button5")); } if (Input.GetKeyDown(KeyCode.Joystick1Button6)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "Joystick1Button6")); } if (Input.GetKeyDown(KeyCode.Joystick1Button7)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "Joystick1Button7")); } if (Input.GetKeyDown(KeyCode.Joystick1Button8)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "Joystick1Button8")); } if (Input.GetKeyDown(KeyCode.Joystick1Button9)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "Joystick1Button9")); } if (Input.GetKeyDown(KeyCode.Joystick1Button10)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "Joystick1Button10")); } if (Input.GetKeyDown(KeyCode.Joystick1Button11)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "Joystick1Button11")); } if (Input.GetKeyDown(KeyCode.Joystick1Button12)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "Joystick1Button12")); } if (Input.GetKeyDown(KeyCode.Joystick1Button13)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "Joystick1Button13")); } if (Input.GetKeyDown(KeyCode.Joystick1Button14)) { DebugSystem.AddLog(DebugSystem.DebugInfo.GetNewDebugInfo( DebugSystem.DebugInfo.DebugLogTypeEnum.Info, SystemName, "Joystick1Button14")); } }