developer dürfen jetzt ansprüche haben
This commit is contained in:
@ -4,7 +4,7 @@ using UnityEngine;
|
||||
|
||||
public class DeveloperNeeds : MonoBehaviour
|
||||
{
|
||||
[SerializeField] List<GameObject> Events = new List<GameObject>();
|
||||
[SerializeField] List<GameObject> Needs = new List<GameObject>();
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
@ -17,4 +17,25 @@ public class DeveloperNeeds : MonoBehaviour
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void spawnNeed(string needName)
|
||||
{
|
||||
switch (needName)
|
||||
{
|
||||
case "coffee":
|
||||
Instantiate(Needs[0], new Vector3(transform.position.x, transform.position.y + 1.0f, transform.position.z), Quaternion.identity);
|
||||
break;
|
||||
case "mate":
|
||||
Instantiate(Needs[1], new Vector3(transform.position.x, transform.position.y + 1.0f, transform.position.z), Quaternion.identity);
|
||||
break;
|
||||
case "toilet":
|
||||
Instantiate(Needs[2], new Vector3(transform.position.x, transform.position.y + 1.0f, transform.position.z), Quaternion.identity);
|
||||
break;
|
||||
case "money":
|
||||
Instantiate(Needs[3], new Vector3(transform.position.x, transform.position.y + 1.0f, transform.position.z), Quaternion.identity);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,12 +32,14 @@ public class NPC_Behavior : MonoBehaviour
|
||||
/// </summary>
|
||||
public double DevelopmentPower => _developementPower;
|
||||
|
||||
public GameManager _gameManager;
|
||||
private GameManager _gameManager;
|
||||
private DeveloperNeeds _developerNeeds;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
_gameManager = GameManager.Instance;
|
||||
_developerNeeds = GetComponent<DeveloperNeeds>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
|
||||
28
3d Prototyp/Assets/Scripts/SpinningSpinner.cs
Normal file
28
3d Prototyp/Assets/Scripts/SpinningSpinner.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class SpinningSpinner : MonoBehaviour
|
||||
{
|
||||
public float spinningSpeed = 100.0f;
|
||||
public float hoverSpeed = 1.5f;
|
||||
public float hoverHeight = 0.1f;
|
||||
|
||||
private float originalY;
|
||||
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Urspr<70>ngliche Y-Position des Objekts speichern
|
||||
originalY = transform.position.y;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
transform.Rotate(0, 0, Time.deltaTime * spinningSpeed);
|
||||
float newY = originalY + (Mathf.Cos(Time.time * hoverSpeed) * hoverHeight);
|
||||
transform.position = new Vector3(transform.position.x, newY, transform.position.z);
|
||||
|
||||
}
|
||||
}
|
||||
11
3d Prototyp/Assets/Scripts/SpinningSpinner.cs.meta
Normal file
11
3d Prototyp/Assets/Scripts/SpinningSpinner.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4b7e9647fcf4a0b439acce6afe885ee3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user