lspdC 6154ddfbb4 3.30
更新落雷动画,修复手持武器位置
明天整合摄像头并最后校对第一关场景和元素的大小比例
2022-03-31 00:17:09 +08:00

47 lines
1.0 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Stone : Interacter
{
public StoneAxe axe;
public float interactTime = 1f;
protected override void Start()
{
base.Start();
}
void Update()
{
}
public override void OnCall()
{
base.OnCall();
switch (interactState) {
case 0:
ChangesDuringIntertacting(interactTime);
if (player.weapon.name == "石刀")
{
player.StoneInteractAnim();//播动画
Debug.Log("玩家制作石斧头动画");
Invoke(nameof(ChangeWeapon), interactTime);//配合动画延迟换武器
}
else {
Debug.Log("拿错物品");
interactState = 0;
}
break;
default:
break;
}
}
void ChangeWeapon()
{
ItemController.Instance.ReplaceItem(axe);
}
}