mxshiiツ
mxshiiツ
CC#
Created by mxshiiツ on 8/12/2024 in #help
✅ help with basic c#
I am following the freeCodeCamp course for c# anyways, i dont understand how to differentiate between loops for, foreach, while, do-while can someone help?
24 replies
CC#
Created by mxshiiツ on 5/3/2023 in #help
❔ unity footstep sound sys
ok so i am trying to make footsteps variance like adding grass footstep sfx and stone footstep sfx and so on
Collider coll;
public PhysicMaterial grass;
public PlayerSoundSys sounds;

void Start()
{
coll = GetComponent<Collider>();
}

private void OnCollisionStay(Collision collision)
{
if(coll.sharedMaterial == grass)
{
sounds.FootStepSoundPlayGrass();
}
}
Collider coll;
public PhysicMaterial grass;
public PlayerSoundSys sounds;

void Start()
{
coll = GetComponent<Collider>();
}

private void OnCollisionStay(Collision collision)
{
if(coll.sharedMaterial == grass)
{
sounds.FootStepSoundPlayGrass();
}
}
but the sound just spams? also i added this script to an object and added animation events to the running animations can someone help?
9 replies