Last active
January 13, 2026 16:28
-
-
Save JaiParakh/8313d911ed3a3411cd59b1c4065c9036 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void checkAllSmells() | |
| { | |
| // Fetches all smell sources in the scene. | |
| SmellSource[] all_smells = FindObjectsOfType<SmellSource>(); | |
| // We can multiple smell sources in our game | |
| foreach (SmellSource smell in all_smells) | |
| { | |
| // We calculate the intensity of the smell here | |
| float intensity = smell.getSmellIntensityAt(transform.position); | |
| // Add your logic here | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment