add doug to dialogue, start grandma quest
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class Ballgun : Tool
|
||||
{
|
||||
[Header("Ball Gun Parameters")]
|
||||
public float shootForce = 10;
|
||||
public GameObject ball;
|
||||
public float ballLifeTime = 5;
|
||||
|
||||
public override void Use()
|
||||
{
|
||||
GameObject newBall = Instantiate(ball);
|
||||
newBall.transform.position = transform.position;
|
||||
|
||||
Vector3 direction = transform.forward * shootForce;
|
||||
direction += GameManager.Instance.GetPlayerController().GetVelocity();
|
||||
|
||||
newBall.GetComponent<Rigidbody>().AddForce(direction, ForceMode.Impulse);
|
||||
|
||||
Destroy(newBall, ballLifeTime);
|
||||
}
|
||||
|
||||
public override void UseAlt()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user