Browse Source

start of ouija game

master
Josh 1 year ago
parent
commit
48c4d8cd42
  1. 22
      namedropper/Assets/Ouija.cs
  2. 11
      namedropper/Assets/Ouija.cs.meta
  3. 26
      namedropper/Assets/Planchette.cs
  4. 11
      namedropper/Assets/Planchette.cs.meta
  5. 6769
      namedropper/Assets/Scenes/Ouija.unity
  6. 7
      namedropper/Assets/Scenes/Ouija.unity.meta
  7. 48
      namedropper/Assets/Scenes/RaceGame.unity
  8. 2
      namedropper/Assets/Scenes/RaceGame.unity.meta
  9. 26
      namedropper/Assets/Scripts/Player.cs
  10. 2
      namedropper/Assets/Scripts/Wraparound.cs
  11. BIN
      namedropper/Assets/Sprites/ouija.jpg
  12. 123
      namedropper/Assets/Sprites/ouija.jpg.meta
  13. BIN
      namedropper/Assets/Sprites/planchette.png
  14. 123
      namedropper/Assets/Sprites/planchette.png.meta
  15. 2
      namedropper/ProjectSettings/EditorBuildSettings.asset
  16. 1
      namedropper/ProjectSettings/TagManager.asset

22
namedropper/Assets/Ouija.cs

@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Ouija : Level
{
// Start is called before the first frame update
void Start()
{
for (int i = 0; i < 3; ++i)
{
_players[i].GetComponent<Player>().BecomeInvisible();
_players[i].GetComponent<Player>().PassInputOnto = _players[3].GetComponent<Player>();
}
}
// Update is called once per frame
void Update()
{
}
}

11
namedropper/Assets/Ouija.cs.meta

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

26
namedropper/Assets/Planchette.cs

@ -0,0 +1,26 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Planchette : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
private void OnTriggerEnter2D(Collider2D other)
{
if (other.gameObject.CompareTag("Letter"))
{
Debug.Log(other.gameObject.name);
}
}
}

11
namedropper/Assets/Planchette.cs.meta

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

6769
namedropper/Assets/Scenes/Ouija.unity

File diff suppressed because it is too large

7
namedropper/Assets/Scenes/Ouija.unity.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 4b27426029785474c988419c9328a8ba
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

48
namedropper/Assets/Scenes/RaceGame.unity

@ -511,6 +511,18 @@ PrefabInstance:
propertyPath: m_SizeDelta.y
value: 164
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalScale.x
value: 0.69945
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalScale.y
value: 0.69945
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalScale.z
value: 0.69945
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalPosition.x
value: 0
@ -2538,6 +2550,18 @@ PrefabInstance:
propertyPath: m_SizeDelta.y
value: 164
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalScale.x
value: 0.69945
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalScale.y
value: 0.69945
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalScale.z
value: 0.69945
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalPosition.x
value: 0
@ -7170,6 +7194,18 @@ PrefabInstance:
propertyPath: m_SizeDelta.y
value: 164
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalScale.x
value: 0.69945
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalScale.y
value: 0.69945
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalScale.z
value: 0.69945
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalPosition.x
value: 0
@ -7655,6 +7691,18 @@ PrefabInstance:
propertyPath: m_SizeDelta.y
value: 164
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalScale.x
value: 0.69945
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalScale.y
value: 0.69945
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalScale.z
value: 0.69945
objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalPosition.x
value: 0

2
namedropper/Assets/Scenes/RaceGame.unity.meta

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 4b27426029785474c988419c9328a8ba
guid: 4c9523faca940b842bda3f3be8070ba3
DefaultImporter:
externalObjects: {}
userData:

26
namedropper/Assets/Scripts/Player.cs

@ -66,6 +66,7 @@ public class Player : MonoBehaviour
private RaceGame _raceGame;
private GoldMiner _goldMinerGame;
private RedLightGreenLight _redlightGreenlightGame;
public bool IsPlanchette = false;
private void Awake()
{
@ -79,7 +80,9 @@ public class Player : MonoBehaviour
_originalSpriteChildTopScale = _spriteChildTop.transform.localScale;
_spriteChild = transform.Find("sprite").gameObject;
_spriteChild.GetComponent<SpriteRenderer>().sprite = _spriteOptions[GameManager.PLAYER_SKIN];
if (IsPlanchette == false)
_spriteChild.GetComponent<SpriteRenderer>().sprite = _spriteOptions[GameManager.PLAYER_SKIN];
_text = transform.GetChild(0).GetComponent<TMPro.TextMeshProUGUI>();
_originalTextScale = _text.transform.localScale;
@ -530,7 +533,7 @@ public class Player : MonoBehaviour
const float RETURN_SPEED = 125f;
if (_goldMinerReturning)
{
transform.position = Vector3.MoveTowards(transform.position, _originalPosition, RETURN_SPEED * Time.deltaTime * _carriedWeight* _carriedWeight * 171f);
transform.position = Vector3.MoveTowards(transform.position, _originalPosition, RETURN_SPEED * Time.deltaTime * _carriedWeight * _carriedWeight * 171f);
if ((transform.position - _originalPosition).magnitude <= .2f)
{
@ -538,22 +541,23 @@ public class Player : MonoBehaviour
_goldMinerReturning = false;
transform.position = _originalPosition;
print("Adding score: " + _carrying.GetComponent<GoldMinerTarget>()._value);
_goldMinerGame.AddScore(_carrying.GetComponent<GoldMinerTarget>()._value *10, _playerNumber);
_goldMinerGame.AddScore(_carrying.GetComponent<GoldMinerTarget>()._value * 10, _playerNumber);
GameObject.Destroy(_carrying);
}
}
_timeToFlip -= Time.deltaTime;
if (IsPlanchette == false) {
_timeToFlip -= Time.deltaTime;
if (_timeToFlip < 0f)
{
_spriteChild.transform.localScale = new Vector3(_spriteChild.transform.localScale.x * -1f, _spriteChild.transform.localScale.y, _spriteChild.transform.localScale.z);
_timeToFlip = .1f;
if (_timeToFlip < 0f)
{
_spriteChild.transform.localScale = new Vector3(_spriteChild.transform.localScale.x * -1f, _spriteChild.transform.localScale.y, _spriteChild.transform.localScale.z);
_timeToFlip = .1f;
_spriteChildTop.transform.localScale = new Vector3(_originalSpriteChildTopScale.x * Random.Range(.95f,1.05f), _originalSpriteChildTopScale.y * Random.Range(.95f, 1.05f), _spriteChild.transform.localScale.z);
_text.transform.localScale = new Vector3(_originalTextScale.x * Random.Range(.95f, 1.05f), _originalTextScale.y * Random.Range(.95f, 1.05f), _text.transform.localScale.z);
_spriteChildTop.transform.localScale = new Vector3(_originalSpriteChildTopScale.x * Random.Range(.95f, 1.05f), _originalSpriteChildTopScale.y * Random.Range(.95f, 1.05f), _spriteChild.transform.localScale.z);
_text.transform.localScale = new Vector3(_originalTextScale.x * Random.Range(.95f, 1.05f), _originalTextScale.y * Random.Range(.95f, 1.05f), _text.transform.localScale.z);
}
}
//_spriteChild.transform.Rotate(Vector3.forward);

2
namedropper/Assets/Scripts/Wraparound.cs

@ -31,7 +31,7 @@ public class Wraparound : MonoBehaviour
return;
}
if (SceneManager.GetActiveScene().name == "TopicSelect" || SceneManager.GetActiveScene().name == "Calibration" || SceneManager.GetActiveScene().name == "Title" || SceneManager.GetActiveScene().name == "GameOver" || SceneManager.GetActiveScene().name == "ChallengingStage" || SceneManager.GetActiveScene().name == "Ontology")
if (SceneManager.GetActiveScene().name == "TopicSelect" || SceneManager.GetActiveScene().name == "Calibration" || SceneManager.GetActiveScene().name == "Title" || SceneManager.GetActiveScene().name == "GameOver" || SceneManager.GetActiveScene().name == "ChallengingStage" || SceneManager.GetActiveScene().name == "Ontology" || SceneManager.GetActiveScene().name == "Ouija")
{
if (this.transform.position.x < 0)
{

BIN
namedropper/Assets/Sprites/ouija.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

123
namedropper/Assets/Sprites/ouija.jpg.meta

@ -0,0 +1,123 @@
fileFormatVersion: 2
guid: fa1fd97c2e9c5bc4e8f31bec6a6e11b8
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
namedropper/Assets/Sprites/planchette.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 KiB

123
namedropper/Assets/Sprites/planchette.png.meta

@ -0,0 +1,123 @@
fileFormatVersion: 2
guid: 77182206eef99a24aa5d4876c030bfb9
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 2
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

2
namedropper/ProjectSettings/EditorBuildSettings.asset

@ -42,7 +42,7 @@ EditorBuildSettings:
path: Assets/Scenes/RoundIntro.unity
guid: b0725f8c0f4a77b4cb681eccd438a4c2
- enabled: 1
path: Assets/Scenes/RaceGame.unity
path: Assets/Scenes/Ouija.unity
guid: 4b27426029785474c988419c9328a8ba
- enabled: 1
path: Assets/Scenes/RedLight.unity

1
namedropper/ProjectSettings/TagManager.asset

@ -7,6 +7,7 @@ TagManager:
- FinishLine
- Midpoint
- RedlightGreenlightFinishLine
- Letter
layers:
- Default
- TransparentFX

Loading…
Cancel
Save