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);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 60f689527708fca4fac4694d80528933
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user