45 lines
947 B
C#
45 lines
947 B
C#
![]() |
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class Fire : Interacter
|
||
|
{
|
||
|
public FireStick fireStick;
|
||
|
override protected void Start()
|
||
|
{
|
||
|
base.Start();
|
||
|
|
||
|
}
|
||
|
|
||
|
// Update is called once per frame
|
||
|
void Update()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
public override void OnCall()
|
||
|
{
|
||
|
base.OnCall();
|
||
|
switch (interactState)
|
||
|
{
|
||
|
case 0:
|
||
|
ChangesDuringIntertacting(1f);
|
||
|
if (player.weapon.name == "火把")
|
||
|
{
|
||
|
Debug.Log("牛逼,烧起来了");
|
||
|
ItemController.Instance.AddItem(fireStick);
|
||
|
ChangeToLastWeapon();
|
||
|
}
|
||
|
else
|
||
|
{ interactState = 0;
|
||
|
Debug.Log("没活了,烧不起来");
|
||
|
}
|
||
|
break;
|
||
|
|
||
|
default:
|
||
|
break;
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|