Add temporary visual + Start Sink
This commit is contained in:
parent
00211b3170
commit
49e03112fd
9 changed files with 556 additions and 27 deletions
37
Assets/Scripts/Cleaning_workshop.cs
Normal file
37
Assets/Scripts/Cleaning_workshop.cs
Normal file
|
@ -0,0 +1,37 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
//Define the behavior of a cleaning workshop
|
||||
public class Cleaning_workshop : MonoBehaviour
|
||||
{
|
||||
public float cleanTime=2.0f; //Time to clean a mug
|
||||
// List<GameObject> stock = new List<GameObject>(); //List of mug in workshop
|
||||
|
||||
//Handle objects interactions w/ Workshop
|
||||
//Return wether the object is taken from tavernkeeper
|
||||
public bool use(GameObject object_used)
|
||||
{
|
||||
if(object_used != null && object_used.tag=="Mug")
|
||||
{
|
||||
Mug mug = object_used.GetComponent<Mug>();
|
||||
if (mug!= null && mug.content is null && mug.dirty) //Mug dirty & empty
|
||||
{
|
||||
Debug.Log(object_used.name+ "cleaned by"+gameObject.name);
|
||||
mug.dirty=false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
Assets/Scripts/Cleaning_workshop.cs.meta
Normal file
11
Assets/Scripts/Cleaning_workshop.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: faa67d8085483414c947fc626db5d950
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue