Exemplo n.º 1
0
 /// <summary>
 /// Initialization of Agent's Resources component.
 /// </summary>
 /// <param name="agent"></param>
 public void Init(Agent agent)
 {
     _agent = agent;
     if (_useHealth)
     {
         _curHealthPoints = _healthPoints;
     }
     if (_useEnergy)
     {
         _curEnergyPoints = _energyPoints;
     }
     _agentAnimation = _agent.AgentAnimation;
     Death.Init(agent);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Initialization of Agent's Resources component.
        /// </summary>
        /// <param name="agent"></param>
        public void Init(Agent agent)
        {
            _agent = agent;

            //Commented code because I want to set the health to _current value

            //if (_useHealth) _curHealthPoints = _healthPoints;
            //if (_useEnergy) _curEnergyPoints = _energyPoints;
            //         if (_useIntoxication) _curIntoxicationPoints = _intoxicationPoints;
            //         if (_useMorale) _curMoralePoints = _moralePoints;
            //         if (_useTemperament) _curTemperamentPoints = _temperamentPoints

            _agentAnimation = _agent.AgentAnimation;
            Death.Init(agent);
        }