Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
unity samples
  • Loading branch information
JOELwindows7 committed May 24, 2024
1 parent 2bbedf7 commit 33143c9
Show file tree
Hide file tree
Showing 606 changed files with 134,801 additions and 23 deletions.
7 changes: 6 additions & 1 deletion CREDIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -7782,4 +7782,9 @@ https://youtu.be/qzhuWRQWK5I?si=PygoI274O32LWD5a
- https://forum.unity.com/threads/from-unity-ui-to-textmeshpro.463619/
- https://docs.unity3d.com/Packages/[email protected]/api/TMPro.TextMeshPro.html
- https://github.com/Perkedel/CVR_Stuffings/blob/main/DiceGlow/Assets/JOELwindows7/Documentations/Bonus/LuaExamples.md
- https://discord.com/channels/410126604237406209/1240763673346183279/1243583950924812449
- https://discord.com/channels/410126604237406209/1240763673346183279/1243583950924812449
- https://discussions.unity.com/t/how-can-i-assign-materials-using-c-code/2205/2
- https://docs.unity3d.com/Packages/[email protected]/manual/index.html
- https://docs.unity3d.com/Manual/shader-graph.html
- https://docs.unity3d.com/Packages/[email protected]/manual/Getting-Started.html
- https://forum.unity.com/threads/srp-v11-beta-is-available-now.1046539/
81 changes: 81 additions & 0 deletions DiceGlow/Assets/JOELwindows7/AnhaLua/Prefabs/AnhaScript.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ MonoBehaviour:
boundThing: {fileID: 1833711788178023598}
- name: PlayThisAudio
boundThing: {fileID: 8300000, guid: ae6cf6cc2d6be51419c5616bb0a3c21d, type: 3}
- name: PlayBeingSteppedOn
boundThing: {fileID: 8300000, guid: ae6cf6cc2d6be51419c5616bb0a3c21d, type: 3}
--- !u!114 &1310377827391953519
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1064,6 +1066,7 @@ GameObject:
- component: {fileID: 5628958791286362899}
- component: {fileID: 7120338222378634100}
- component: {fileID: 7422772154312198922}
- component: {fileID: 8037556748298588740}
m_Layer: 0
m_Name: Caok
m_TagString: Untagged
Expand Down Expand Up @@ -1150,6 +1153,84 @@ CapsuleCollider:
m_Height: 2
m_Direction: 1
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &8037556748298588740
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8970662863706720314}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a45fb99111d54dba84a8ff33016b93fd, type: 3}
m_Name:
m_EditorClassIdentifier:
tooltip:
actions:
- delay: 0
operations:
- type: 21
targets:
- {fileID: 0}
floatVal: 0
stringVal:
stringVal2:
stringVal3:
stringVal4:
boolVal: 0
boolVal2: 0
gameObjectVal: {fileID: 0}
floatVal2: 0
floatVal3: 0
floatVal4: 0
varBufferVal: {fileID: 0}
varBufferVal2: {fileID: 0}
varBufferVal3: {fileID: 0}
animationVal: {fileID: 0}
customEvent:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 2593186904241057723}
m_TargetAssemblyTypeName: UnityEngine.Component, UnityEngine
m_MethodName: SendMessage
m_Mode: 5
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument: CapsuleGrey
m_BoolArgument: 0
m_CallState: 2
actionType: 3
execType: 1
layerMask:
serializedVersion: 2
m_Bits: 0
floatVal: 10
floatVal2: 0
floatVal3: 0
boolVal: 0
boolVal2: 0
varBufferVal: {fileID: 0}
varBufferVal2: {fileID: 0}
stringVal:
allowedPointer: []
allowedPointerCollapse: 0
allowedTypes: []
allowedTypesCollapse: 0
specificParticleSystems: []
specificParticleSystemsCollapse: 0
interactionFilter: 0
interactionInput: 48
interactionInputModifier: 0
guid:
onEnterSeat:
m_PersistentCalls:
m_Calls: []
onExitSeat:
m_PersistentCalls:
m_Calls: []
--- !u!1001 &8731770588580231333
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down
30 changes: 28 additions & 2 deletions DiceGlow/Assets/JOELwindows7/AnhaLua/Scripts/AnhaTest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ local tmTextItself
local aSpeaker
local aSpeakerCompo
local aAudioStream
local aSteppedOnStream
local angle = 0
local toMoveAt = 0
local isBacking = false
Expand All @@ -72,6 +73,8 @@ local title = 'Halo Lua from JOELwindows7\nAlso thancc LensError for example sni
local installSay = ''
local sayWelcomeHome = ''
local sayPlayersFuzzy = ''
local flyAllowed = 'no'
local ruleSays = ''
local playerCount = 0
local playersYouHave = {}
local areWeOnline = 'No'
Expand Down Expand Up @@ -131,6 +134,17 @@ function OnMouseDown()
end
end

function OnCollisionEnter(collision)
if aSpeakerCompo then
-- https://docs.unity3d.com/ScriptReference/AudioSource.PlayOneShot.html
aSpeakerCompo.PlayOneShot(aSteppedOnStream,1)
end
end

function UpdateInstallSay()
installSay = title .. "\n" .. selectQuote .. "\n" .. "World: " .. InstancesAPI.InstanceName .. "(" .. InstancesAPI.InstancePrivacy .. ")\n" .. "Rules: " .. ruleSays .. "\n" .. "Connection: " .. areWeOnline .. " (" .. InstancesAPI.Ping .. " ms)\n" .. sayWelcomeHome .. "\n" .. "Players (" .. playerCount .. "):\n" .. sayPlayersFuzzy
end

-- Start is called before the first frame update
function Start()
print "Hello world!"
Expand All @@ -142,6 +156,7 @@ function Start()
tmThingy = BoundObjects.TitlerOld
aSpeaker = BoundObjects.Speaker
aAudioStream = BoundObjects.PlayThisAudio
aSteppedOnStream = BoundObjects.PlayBeingSteppedOn
if not tmThingy then
print('WERROR! tmThingy not bounded!!!')
else
Expand All @@ -155,7 +170,8 @@ function Start()
aSpeakerCompo = aSpeaker.GetComponent("UnityEngine.AudioSource")
end

installSay = title .. "\n" .. "Ping: " .. InstancesAPI.Ping .. "\n" .. sayWelcomeHome .. "\n"
-- installSay = title .. "\n" .. "Ping: " .. InstancesAPI.Ping .. "\n" .. sayWelcomeHome .. "\n"
UpdateInstallSay()

if not tmTextItself then
print "compo nil"
Expand Down Expand Up @@ -225,7 +241,17 @@ function Update()
sayPlayersFuzzy = sayPlayersFuzzy .. playersYouHave[i].Username .. ", "
end

installSay = title .. "\n" .. selectQuote .. "\n" .. "World: " .. InstancesAPI.InstanceName .. "(" .. InstancesAPI.InstancePrivacy .. ")\n" .. "Connection: " .. areWeOnline .. "(" .. InstancesAPI.Ping .. " ms)\n" .. sayWelcomeHome .. "\n" .. "Players (" .. playerCount .. "):\n" .. sayPlayersFuzzy
-- fly check
if PlayerAPI.LocalPlayer.IsFlightAllowed then
flyAllowed = ""
else
flyAllowed = "NoFlying"
end

ruleSays = ''
ruleSays = ruleSays .. flyAllowed .. ' '

UpdateInstallSay()
-- installSay = 'test'
-- tmpThingy.gameObject.TMP_Text.text = installSay
-- tmpTextItself.text = installSay
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3677132415523780663, guid: 4e88290e9741f534dacde2707b43cf19, type: 3}
propertyPath: randomNum
value: 27281030
value: 78225153
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 4e88290e9741f534dacde2707b43cf19, type: 3}
Expand Down
8 changes: 8 additions & 0 deletions DiceGlow/Assets/Samples/Unity Toon Shader.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions DiceGlow/Assets/Samples/Unity Toon Shader/0.10.0-preview.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"displayName": "Legacy render pipeline",
"description": "Sample scenes for the legacy (built-in) pipe-lines.",
"createSeparatePackage": false
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 33143c9

Please sign in to comment.