private void AttemptPoop() { float poopSize = gm.AttemptPoop(); if (poopSize != 0) { Transform p = Instantiate(poopPrefab) as Transform; Poop poop = p.GetComponent <Poop>(); poop.SpawnPoop(new Vector3(transform.position.x, transform.position.y, transform.position.z), direction, poopSize, currentSpeed, gm); switch ((int)poopSize) { case 1: case 2: AudioManager.instance.PlayPoopLaunchSound(aSource, 0); break; case 3: case 4: AudioManager.instance.PlayPoopLaunchSound(aSource, 1); break; case 5: case 6: AudioManager.instance.PlayPoopLaunchSound(aSource, 2); break; } } }
public Task <int> SavePoopAsync(Poop poop) { if (poop.ID != 0) { return(Database.UpdateAsync(poop)); } else { return(Database.InsertAsync(poop)); } }
void Awake() { health = FindObjectOfType <Health>(); poopScript = FindObjectOfType <Poop>(); }
void Awake() { health = FindObjectOfType <Health>(); poopScript = FindObjectOfType <Poop>(); controller = FindObjectOfType <CharacterController2D>(); }
private Task SavePoopAsync(Poop poop) { throw new NotImplementedException(); }
public Task <int> DeletePoopAsync(Poop poop) { return(Database.DeleteAsync(poop)); }