Added Readme and Cleanup

This commit is contained in:
MarcoHampel 2024-02-01 22:46:09 -05:00
parent 5192d8b669
commit 489316b9ee
8 changed files with 56 additions and 121 deletions

View File

@ -1,26 +0,0 @@
using UnityEngine;
public class DGemItem : MonoBehaviour
{
[SerializeField] private float decSpeed = 5f;
// Start is called before the first frame update
private void Start()
{
}
// Update is called once per frame
private void Update()
{
}
private void OnTriggerEnter(Collider collision)
{
if (collision.gameObject.CompareTag("Player"))
{
collision.gameObject.GetComponent<PlayerMovementController>().SetSpeed(decSpeed);
Destroy(gameObject);
}
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: b81301b367248407f8c53744b655b039
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,33 +0,0 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.VFX;
public class VectorFieldHandler : MonoBehaviour
{
[SerializeField] private float avoidanceDist;
[SerializeField] private List<Vector3> avoidances;
[SerializeField] private Vector3 size;
[SerializeField] private VisualEffect effect;
private Texture3D vField;
// Start is called before the first frame update
private void Start()
{
vField = new Texture3D((int)size.x, (int)size.y, (int)size.z, TextureFormat.RFloat, 0);
for (var x = 0; x < size.x; x++)
for (var y = 0; y < size.y; y++)
for (var z = 0; z < size.z; z++)
vField.SetPixel(x, y, z, new Color(1, 0, 0, 0));
//vField.SetPixel(0, 0, 0, new Color(1, 0, 0, 0));
effect.SetTexture("VectorField", vField);
}
// Update is called once per frame
private void Update()
{
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 72a473445b963b24abc84791b0ffacaa
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,26 +0,0 @@
using UnityEngine;
public class GemItem : MonoBehaviour
{
[SerializeField] private float instantSpeed = 98f;
// Start is called before the first frame update
private void Start()
{
}
// Update is called once per frame
private void Update()
{
}
private void OnTriggerEnter(Collider collision)
{
if (collision.gameObject.CompareTag("Player"))
{
collision.gameObject.GetComponent<PlayerMovementController>().SetSpeed(instantSpeed);
Destroy(gameObject);
}
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 1330f6d70036c9847aec81a067a760d0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,54 @@
Class Definitions:
Overview: Basically the classes are built out to uniquely abstract certain types of objects.
Basically there are currently only Interactable Items that are used. Some are heavy (ie Power Cores)
used to power things like doors. The classes defined here offer functionality over serveral abstraction layers
to keep implementation of new items at a minimum with higher layers automatically performing tasks.
CarryableItem
- Type: Abstract Class
- Extends: MonoBehaviour
- Description: The highest level representation of an item.
- Features: Forces an item to have a size and name.
InteractableItem
- Type: Abstract Class
- Extends: CarryableItem
- Description: Any 3D in world item that can be picked up in the game.
- Features:
- Must have a In World Canvas and Text that appears whenever the player gets close.
Generic Interactable:
- Type: Class
- Extends: InteractableItem
- Description: Object has no functionality other than enforcing InteractableItem's features.
This was done since Abstract Classes cannot be instantiated in a scene.
Heavy Interactable:
- Type: Class
- Extends: InteractableItem
- Description: A large item that the astronaut has to carry in their arms.
- Features:
- Offers functionality to Enable and Disable the collision systems of a Heavy
item for pickup. Additionally defines functions for classes that extend it to
define how it gets interacted with.
Heavy Item Receiver:
- Type: Abstract Class
- Extends: InteractableItem
- Description: Represents items that stores Heavy Interactable Items within.
- Features:
- Defines space for the Heavy Item that is stored within it.
- Defines a keyword the receiver looks for when a heavy item is inserted.
Door Interactable Item:
- Type: Class
- Extends: Heavy Item Receiver
- Description: Represents power slots for doors. Taking in a Heavy Interactable Item with
the name "Power Core" in it.
- Features:
- Defines the Interact() function for when a player clicks the interaction button.
- Checks if a player has a heavy item in its hands and moves it into the slot both
on back-end and visually.
- Then modifies the door's animator to animate it opening/closing.

View File

@ -1,7 +1,6 @@
fileFormatVersion: 2
guid: a790bc1f421c79948b8379e14ea3907d
folderAsset: yes
DefaultImporter:
guid: 2ce538ccda9e214428659cda939799a1
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName: