1.处理了昨天提出的建议 1)给第一个CG加上了音效,已经上传Coding 2)给第一关添加了微弱的雨声 3)触发老兵牺牲时添加了管弦乐 4)发令员和敌人被吸引的音效已经裁剪完成,在Soundeffect文件夹里,罕见语音1-7 5)添加了发报机启动和记录纸张被撕去的声音 6)修正了第二关的视差组件 7)稍微优化了第二关背景火光,但还需要再研究 8)机枪开枪音效已经替换为更有力的 9)修正了第二关夜晚的蟋蟀声音 2.二进制文件(音乐,图片等不能直接以文本表示的文件)无法参与分支合并,导致我这里程序改过的电报音乐还是之前的,建议以后处理这类文件直接添加新文件 3.对玩家回去看老兵事件的建议 直接弹出对话 1)...... 2)(肩章上面写着 八路军 中华民国28年度配用) 3)可以休息了,同志。 4)任务很紧急,要继续前进了。
59 lines
1.8 KiB
C#
59 lines
1.8 KiB
C#
using System.Collections;
|
||
using System.Collections.Generic;
|
||
using UnityEngine;
|
||
using Fungus;
|
||
using UnityEngine.InputSystem;
|
||
|
||
public class NormalInvestableItems : Interactive
|
||
{
|
||
// Start is called before the first frame update
|
||
//普通可调查对象的类,用在按F可以触发调查对话的对象上💬
|
||
public string itemName;
|
||
private bool isMoving = false;
|
||
|
||
//水缸才用得上,基类里写这个,属于屎山代码
|
||
private Transform watertank;
|
||
private Vector3 target;
|
||
//
|
||
void Start()
|
||
{
|
||
target = new Vector3(1.92999995f,-1.37871194f,0);
|
||
try
|
||
{
|
||
watertank = GameObject.Find("水缸").transform;
|
||
}
|
||
catch(System.Exception){}
|
||
}
|
||
|
||
// Update is called once per frame
|
||
void Update()
|
||
{
|
||
if(isMoving) watertank.position += (target - watertank.position)*
|
||
Time.deltaTime*
|
||
1f;
|
||
}
|
||
|
||
public override void OnCall()
|
||
{
|
||
if(itemName == "准备出发时的水缸")
|
||
{
|
||
//这项比较特殊,只能这样单独写了,我有罪,这是屎山代码
|
||
isMoving = true;
|
||
FindObjectOfType<AReadyMachine>().m_Collider.enabled = true;
|
||
//播放移动水缸的音效
|
||
GetComponent<AudioSource>().Play();
|
||
}
|
||
else if(itemName != "准备出发幕的镜子")
|
||
{
|
||
Debug.Log("我触发了"+ gameObject.name +"的对话");
|
||
Flowchart.BroadcastFungusMessage("谈论" + itemName);
|
||
//修改玩家操作地图为空,解决玩家在对话时还能移动的问题
|
||
FindObjectOfType<M_Player>().GetComponent<PlayerInput>().SwitchCurrentActionMap("NullMap");
|
||
}
|
||
|
||
}
|
||
|
||
//返回水缸的运动状态
|
||
public bool CheckMoving(){return isMoving;}
|
||
}
|