public void Talk(Ferret to) { if (m_CanTalk) { Say(m_Vocabulary[Utility.Random(m_Vocabulary.Length)]); if (to != null && Utility.RandomBool()) { Timer.DelayCall(TimeSpan.FromSeconds(Utility.RandomMinMax(5, 8)), new TimerCallback(delegate() { to.Talk(); })); } m_CanTalk = false; Timer.DelayCall(TimeSpan.FromSeconds(Utility.RandomMinMax(20, 30)), new TimerCallback(delegate() { m_CanTalk = true; })); } }
public void Talk( Ferret to ) { if ( m_CanTalk ) { if ( to != null ) QuestSystem.FocusTo( this, to ); Say( m_Vocabulary[ Utility.Random( m_Vocabulary.Length ) ] ); if ( to != null && Utility.RandomBool() ) Timer.DelayCall( TimeSpan.FromSeconds( Utility.RandomMinMax( 5, 8 ) ), new TimerCallback( delegate() { to.Talk(); } ) ); m_CanTalk = false; Timer.DelayCall( TimeSpan.FromSeconds( Utility.RandomMinMax( 20, 30 ) ), new TimerCallback( delegate() { m_CanTalk = true; } ) ); } }
public void Talk(Ferret to) { if (m_CanTalk) { if (to != null) QuestSystem.FocusTo(this, to); Say(m_Vocabulary.RandomElement()); if (to != null && Utility.RandomBool()) Timer.DelayCall(TimeSpan.FromSeconds(Utility.RandomMinMax(5, 8)), to.Talk); m_CanTalk = false; Timer.DelayCall(TimeSpan.FromSeconds(Utility.RandomMinMax(20, 30)), ResetCanTalk); } }
public void Talk(Ferret to) { if (m_CanTalk) { if (to != null) { QuestSystem.FocusTo(this, to); } Say(m_Vocabulary[Utility.Random(m_Vocabulary.Length)]); if (to != null && Utility.RandomBool()) { Timer.DelayCall(TimeSpan.FromSeconds(Utility.RandomMinMax(5, 8)), delegate { to.Talk(); }); } m_CanTalk = false; Timer.DelayCall(TimeSpan.FromSeconds(Utility.RandomMinMax(20, 30)), delegate { this.m_CanTalk = true; }); } }