/// <summary> /// Make the mob fall to the ground if it isn't already there /// </summary> private void Knockdown() { if (!isKnockedDown) { isKnockedDown = true; registerObject.SetPassable(false, true); mobSprite.SetToBodyLayer(); SoundManager.PlayNetworkedAtPos(SingletonSOSounds.Instance.Bodyfall, transform.position, sourceObj: gameObject); mobSprite.SetRotationServer(knockedDownRotation); } }
/// <summary> /// Make the mob fall to the ground if it isn't already there /// </summary> private void Knockdown() { if (!isKnockedDown) { isKnockedDown = true; registerObject.Passable = true; mobSprite.SetToBodyLayer(); SoundManager.PlayNetworkedAtPos("Bodyfall", transform.position, sourceObj: gameObject); mobSprite.SetRotationServer(knockedDownRotation); } }
/// <summary> /// Make the mob stand up if it isn't already stood /// </summary> private void GetUp() { if (isKnockedDown) { isKnockedDown = false; registerObject.RestorePassableToDefault(); mobSprite.SetToNPCLayer(); mobSprite.SetRotationServer(0f); } }