Roman 380b3ef38a 任务:替换现有美术素材和动画、完善游戏的流程化
*导入了麒哥动画包7
场景【序章-家中】
1.替换他老爹坐着的素材,并赋予动画
2.修复无论哪一个多态都可以跟门互动的Bug
3.老爹离家后,摧毁电报机
4.修正多态初始设置的角色位置,解决刚开场景时角色会有一小段下坠的问题
5.修复玩家触发对话时还能移动的问题
6.创建对话【开门演出开幕】,并使其在场景多态初始化时触发

场景【序章-战场】
1.给老爹加上跑动的动画
2.给老爹加上下坑和上坑动画
3.使得修电话线的进圆形进度UI会跟随玩家
4.调整导弹阴影高度
2021-08-27 01:47:46 +08:00

25 lines
923 B
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;
public class DownOrUpPoint : MonoBehaviour
{
//下坑点的控制代码,当触发器监测到玩家进入触发器且下坑方向匹配,则发信给玩家、让其执行下坑动画
[Tooltip("请填入这个点触发所需要的面部朝向1代表右-1代表左")]
public int dir;
[Tooltip("请填入这个点的类型是上坑还是下坑1代表上-1代表下")]
public int type;
void OnTriggerStay2D(Collider2D other)
{
if(other.tag == "Player" && other.GetComponent<M_Player>().ReturnFaceDir() == dir)
{
//当玩家触发触发器,并且方向和记录方向一致
if(type == -1)
other.GetComponent<M_Player>().PlayDownAnimation();
if(type == 1)
other.GetComponent<M_Player>().PlayUpAnimation();
}
}
}