private void Start()
 {
     fatScript = GetComponent <FatScript>();
     GetComponent <PlatformingCharacter>().OnJump += PlatformingCharacterSounds_OnJump;
     GetComponent <PlatformingCharacter>().OnLand += PlatformingCharacterSounds_OnLand;
     fatScript.OnEat   += FatScript_OnEat;
     fatScript.OnTrain += FatScript_OnTrain;
 }
示例#2
0
 // Update is called once per frame
 void Update()
 {
     if (fatty)
     {
         platform.enabled = fatty.Fat < 4;
     }
     else
     {
         fatty = FindObjectOfType <FatScript>();
     }
 }