示例#1
0
    private void DyingEnter()
    {
        // @TODO: Remove hard-coded value.
        m_DeathSystem.CollectDeath();
        m_DeathSystem.PlayDeathAnimation(this.transform.position);
        m_ScoreSystem.Collect(100);
        m_ClientSpawnSystem.DespawnClient(this.gameObject);

        SoundEffectController.PlayEffect(EffectType.ClientDies);
    }
示例#2
0
        private void OnOfferReceived(int offer)
        {
            var  cost   = m_ClientData.LookingProduct.Cost;
            bool accept = ShouldAcceptOffer(offer, cost);

            if (accept)
            {
                m_ScoreSystem.Collect(offer);
                m_ProductDisplayController.SellProduct(m_ClientData.LookingProductIndex);
                m_ClientData.AcceptTransaction(offer, cost);
                m_ClientBehaviour.SetState(ClientState.Idle);
                Debug.Log($"Client {name} accepted offer of {offer}.");
            }
            else
            {
                m_ClientData.IncreaseHappiness(-5); // @TODO : Remove hard-coded value.
                m_ClientBehaviour.SetState(ClientState.ProductGiveUp);
                Debug.Log($"Client {name} refused offer.");
            }
        }