
1.创建可交互电报机这个逻辑物体 *.在所有脚本首行添加说明方便查看 2.编写假电报机类,因为这个电报机没有电报机功能,而是一个类似事件的物体。 3.使假电报机可以分清场景中电话线断裂和修复的情况,并对其做出不同反应。 4.没修完电报机的反馈等待策划,修完了的等待我明天编写场景的多态系统 5.均通过了程序简单测试,请各位尽快拉取寻找问题 下班,别摸了,兄弟们
36 lines
861 B
C#
36 lines
861 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using Fungus;
|
|
|
|
public class Father : NormalInvestableItems
|
|
{
|
|
// Start is called before the first frame update
|
|
//父亲类,控制父亲作为可对话对象那会儿的父亲
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public override void OnCall()
|
|
{
|
|
//Debug.Log("我触发了和父亲的对话");
|
|
Flowchart.BroadcastFungusMessage("与父亲对话");
|
|
}
|
|
|
|
public void OnTalkToSonEnd()
|
|
{
|
|
//Debug.Log("对话结束,打开电报机页面");
|
|
m_interface.SetActive(true);
|
|
M_Player player = FindObjectOfType<M_Player>();
|
|
player.catched = m_interface.GetComponent<Machine>();
|
|
m_interface.GetComponent<Machine>().OnCall();
|
|
}
|
|
}
|