Moved VendingMachine.cs to correct folder
This commit is contained in:
23
3d Prototyp/Assets/Scripts/Interaction/VendingMachine.cs
Normal file
23
3d Prototyp/Assets/Scripts/Interaction/VendingMachine.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Interaction;
|
||||
using UnityEngine;
|
||||
|
||||
public class VendingMachine : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private PickupInteractible _pizzaPrefab;
|
||||
|
||||
[SerializeField]
|
||||
private Transform _pizzaChute;
|
||||
|
||||
[SerializeField]
|
||||
private float _shootForce;
|
||||
|
||||
public void DropPiza()
|
||||
{
|
||||
PickupInteractible pizza = Instantiate(_pizzaPrefab, _pizzaChute.position, _pizzaChute.rotation);
|
||||
|
||||
pizza.GetComponent<Rigidbody>().AddForce(new Vector3(0, 0, _shootForce), ForceMode.Impulse);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user