SAIPO 153454f312 修改建议
1.在第一次与父亲对话时加入了对电报机操作的语言
2.在序章中的背景加入视差
3.加入了一个Shake脚本,以提供物体震动(实装到了石堆上面 效果还可以)

4.对检查死亡的机枪手的对话(我不会用fungus哼哼啊啊啊啊)
 1)(已经是一具没有气息的尸体了)
 2)父亲被你们所害,这是你们罪有应得。
2021-09-14 03:08:27 +08:00

70 lines
2.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Fungus;
using UnityEngine.InputSystem;
public class Veteran : Interactive
{
//控制老兵的类
private MachineGunner gunner;
private bool hasCalledChat1 = false;//记录自己是否已经呼叫过对话1即【你想送命
public bool isDead = false;//记录自己是否已经牺牲
void Start()
{
gunner = FindObjectOfType<MachineGunner>();
}
// Update is called once per frame
void Update()
{
}
void OnTriggerEnter2D(Collider2D other)
{
if(other.tag == "Player")//当玩家进入触发器
{
//先检查一下敌人状态
if(gunner.AreYouOK())//如果敌人还没晕
{
//修改面部朝向为左
transform.localScale = new Vector3(
Mathf.Abs(transform.localScale.x)*-1,
transform.localScale.y,
transform.localScale.z);
//弹出对话【你想送命?】
if(!hasCalledChat1)
{
FindObjectOfType<PlayerInput>().SwitchCurrentActionMap("NullMap");
Flowchart.BroadcastFungusMessage("你想送命?");
hasCalledChat1 = true;
}
}
//如果敌人晕了
else
{
//将其作为可catch对象准备触发【你还挺有能耐】对话
other.GetComponent<M_Player>().catched = this;
}
}
}
public override void OnCall()
{
if(!isDead)//如果还没牺牲,触发对话【你还挺有能耐】
{
//如果能运行到这里,说明敌人已经被击晕了,直接触发对话【你还挺有能耐】
FindObjectOfType<PlayerInput>().SwitchCurrentActionMap("NullMap");
Flowchart.BroadcastFungusMessage("你还挺有能耐");
}
else//若已经牺牲
{
FindObjectOfType<PlayerInput>().SwitchCurrentActionMap("NullMap");
Flowchart.BroadcastFungusMessage("同志安息");
}
}
}