game: adding stamps to docs
This commit is contained in:
parent
65944ad293
commit
f9b98143ac
4 changed files with 74 additions and 4 deletions
|
@ -421,6 +421,7 @@ GameObject:
|
||||||
- component: {fileID: 293104327892002700}
|
- component: {fileID: 293104327892002700}
|
||||||
- component: {fileID: 6134616620558523450}
|
- component: {fileID: 6134616620558523450}
|
||||||
- component: {fileID: 6557374802837956815}
|
- component: {fileID: 6557374802837956815}
|
||||||
|
- component: {fileID: 8309060703793887976}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Spawnable_Doc
|
m_Name: Spawnable_Doc
|
||||||
m_TagString: Paper
|
m_TagString: Paper
|
||||||
|
@ -687,6 +688,22 @@ MonoBehaviour:
|
||||||
m_MinimumScaleRatio: 0.25
|
m_MinimumScaleRatio: 0.25
|
||||||
m_MaximumScaleRatio: 2
|
m_MaximumScaleRatio: 2
|
||||||
m_ScaleMultiplier: 0.25
|
m_ScaleMultiplier: 0.25
|
||||||
|
--- !u!114 &8309060703793887976
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7198325426086921740}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 1f3e93bae10a1134893965e7b7848721, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
financialStamp: {fileID: 5171638457085779601}
|
||||||
|
residentialStamp: {fileID: 8483741412558904842}
|
||||||
|
dvStamp: {fileID: 6773870658245588299}
|
||||||
|
disabilitiesStamp: {fileID: 6129449821560067841}
|
||||||
--- !u!1 &8483741412558904842
|
--- !u!1 &8483741412558904842
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
39
SSLR/Assets/Scripts/StampDocument.cs
Normal file
39
SSLR/Assets/Scripts/StampDocument.cs
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class StampDocument : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] private GameObject financialStamp;
|
||||||
|
[SerializeField] private GameObject residentialStamp;
|
||||||
|
[SerializeField] private GameObject dvStamp;
|
||||||
|
[SerializeField] private GameObject disabilitiesStamp;
|
||||||
|
|
||||||
|
void Awake()
|
||||||
|
{
|
||||||
|
financialStamp.SetActive(false);
|
||||||
|
residentialStamp.SetActive(false);
|
||||||
|
dvStamp.SetActive(false);
|
||||||
|
disabilitiesStamp.SetActive(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StampFinancial()
|
||||||
|
{
|
||||||
|
financialStamp.SetActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StampResidential()
|
||||||
|
{
|
||||||
|
residentialStamp.SetActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StampDV()
|
||||||
|
{
|
||||||
|
dvStamp.SetActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StampDisabilities()
|
||||||
|
{
|
||||||
|
disabilitiesStamp.SetActive(true);
|
||||||
|
}
|
||||||
|
}
|
11
SSLR/Assets/Scripts/StampDocument.cs.meta
Normal file
11
SSLR/Assets/Scripts/StampDocument.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1f3e93bae10a1134893965e7b7848721
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -6,10 +6,13 @@ using UnityEngine;
|
||||||
public class StampInteractor : MonoBehaviour
|
public class StampInteractor : MonoBehaviour
|
||||||
{
|
{
|
||||||
public string stampName;
|
public string stampName;
|
||||||
|
private StampDocument stampDocScript;
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
stampName = gameObject.name;
|
stampName = gameObject.name;
|
||||||
|
|
||||||
|
stampDocScript = gameObject.GetComponent<StampDocument>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnCollisionEnter(Collision collision)
|
private void OnCollisionEnter(Collision collision)
|
||||||
|
@ -20,19 +23,19 @@ public class StampInteractor : MonoBehaviour
|
||||||
|
|
||||||
if (stampName == "Stamp_Financial")
|
if (stampName == "Stamp_Financial")
|
||||||
{
|
{
|
||||||
Debug.Log("Financial Document");
|
stampDocScript.StampFinancial();
|
||||||
}
|
}
|
||||||
else if (stampName == "Stamp_Residential")
|
else if (stampName == "Stamp_Residential")
|
||||||
{
|
{
|
||||||
Debug.Log("Residential Document");
|
stampDocScript.StampResidential();
|
||||||
}
|
}
|
||||||
else if (stampName == "Stamp_DV")
|
else if (stampName == "Stamp_DV")
|
||||||
{
|
{
|
||||||
Debug.Log("Domestic Violence Document");
|
stampDocScript.StampDV();
|
||||||
}
|
}
|
||||||
else if (stampName == "Stamp_Disabilities")
|
else if (stampName == "Stamp_Disabilities")
|
||||||
{
|
{
|
||||||
Debug.Log("Disabilities Document");
|
stampDocScript.StampDisabilities();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue