private IEnumerator MatingCoroutine(PandaMatingActivityArea otherPandaMatingActivityArea) { _flag.AddActivity(otherPandaMatingActivityArea); _thisPanda.ChangeEro(_SexEroCost); _thisPanda.GetComponentNotNull <NavMeshAgent>().velocity = Vector3.zero; _thisPanda.GetComponentNotNull <NavMeshAgent>().isStopped = true; _thisPanda.StartAnimationState(PandaAnimationState.Sexing); Debug.Log("Fucky-fucky"); SoundManager.instance.PlaySustainedTheme(_thisPanda.gameObject, SoundType.Sex, _SexTime + 0.3f); yield return(new WaitForSeconds(_SexTime)); _thisPanda.GetComponentNotNull <NavMeshAgent>().isStopped = false; _thisPanda.StopAnimationState(PandaAnimationState.Sexing); if (_thisPanda.GetGender() == Gender.Female) { SoundManager.instance.PlayOneShotSound(SoundType.Yay); Debug.Log("Created child"); ChildPandaCreator.InstantianteChild(_thisPanda.gameObject, otherPandaMatingActivityArea._thisPanda.gameObject); } _flag.RemoveActivity(otherPandaMatingActivityArea); }
private void StartMating(PandaMatingActivityArea otherPandaMatingActivityArea) { StartCoroutine(MatingCoroutine(otherPandaMatingActivityArea)); }