## 1.內部函數 ``` float shaderControllerScriptInt = 1f; public static int RandombehaviorState { get; private set; } private bool isActivable = true; ``` shaderControllerScriptInt是知道現在CameraEffect的模糊度是怎樣,0的話會變紅,1正常,其他會是模糊的狀態 RandombehaviorState 是去追蹤現在的Random Event,目前如下 0:無 1:一個事件在發生中(除了3事件,因為它要一直更新UI) 2:畫面變紅且會產生特殊音效 3:將UI變成亂碼 #### P.S.將UI變成亂碼的功能,只會更改目前已顯示的UI isActivable是去追縱Random Emotion Event是否可以觸發 ## 2.觸發機制 當isActivable時,可以產生一個Random Event,之後isActivable會變false,直到經過約2分鐘後才會重置成true 在Random Event目前效果大約都10秒,10秒後會觸發各自Event Function的Reset Funciton ## 3.Emotion 現在收到Python那邊Emotion訊號的時候EmotionIntegration的isEmotionRecevied會丟出一個true的訊號,當接收到這個true訊號時EmotionIntegration那邊會根據其Emotion對該Emotion Value做加成 EmotionVariation會通過現在情緒和上一個情緒做變化 P:上一個 C:現在 P:neutral + C:neutral = excitement P:fear + C:happy or neutral = relief P:happy or neutral + C:fear = tension 目前是這樣,之後可能會增加Emotion Value的計算進去 目前因為Debug方便,所以目前將功能做成根據目前情緒變化來呼叫Random Emotion Event,但之後會改成根據Emotion Value的值和EmotionVariation做Random Event 在JumpScare的情況下,當玩家觸碰到了JumpScareTrigger,會根據目前的Emotion去產生不同的效果 | Emotion | Behavior | | ------- | ------------------- | | neutral | 啥事沒有 | | fear | 廁所隔間門自動打開| | anger | 鏡子破裂 | | tension | 畫面變得扭曲 | | relief | 找到關鍵道具 | | excitement| 鏡子無法反射 | ## Mission & End Mechanics(想法) 每10分鐘為一個循環 第一個10分鐘為default的任務 從上個任務中的10分鐘,去取得那段時間的Emotion Value總合,然後根據最大的Emotion value去做下次任務的變化,和劇情的推進。