예제 #1
0
    // Start is called before the first frame update
    void Start()
    {
        _memory             = GetComponent <CreatureMemory>();
        _statRates          = GetComponent <StatChangeRates>();
        _brain              = GetComponent <Brain>();
        _creatureStatistics = GetComponent <CreatureStatistics>();
        if (_creatureStatistics != null)
        {
            _creatureStats.Health      = _creatureStatistics.maxHealth;
            _creatureStats.Stamina     = _creatureStatistics.maxStamina;
            _creatureStats.Energy      = _creatureStatistics.maxEnergy;
            _creatureStats.Food        = _creatureStatistics.maxFood;
            _creatureStats.Water       = _creatureStatistics.maxWater;
            _creatureStats.Strength    = _creatureStatistics.maxStrength;
            _creatureStats.Fortitude   = _creatureStatistics.maxFortitude;
            _creatureStats.Torpidity   = _creatureStatistics.maxTorpidity;
            _creatureStats.AttackRate  = _creatureStatistics.attackRate;
            _creatureStats.AttackReach = _creatureStatistics.attackReach;
            _creatureStats.Mass        = _creatureStatistics.maxMass;
            _creatureStats.BiteSize    = _creatureStatistics.biteSize;
        }
        _statAlerts = GetComponent <CreatureAlerts>();

        _creatureLiveStats = _creatureStats;
    }
예제 #2
0
    //public bool isHunting = false;
    // Start is called before the first frame update
    void Start()
    {
        //_attack = GetComponent<CreatureAttack>();
        _memory = GetComponent <CreatureMemory>();

        _creatureStatus = GetComponent <CreatureStatus>();
        agent           = GetComponent <NavMeshAgent>();
    }
예제 #3
0
파일: Brain.cs 프로젝트: GrimStar/EcoSim
 private void Awake()
 {
     _bio     = GetComponent <Biology>();
     _harvest = GetComponent <IHarvest>();
     _attack  = GetComponent <IAttack>();
     _memory  = GetComponent <CreatureMemory>();
     _nav     = GetComponent <NPCNavigation>();
     _reach   = GetComponent <IHaveReach>();
     _drink   = GetComponent <CreatureDrink>();
 }
예제 #4
0
 // Start is called before the first frame update
 void Start()
 {
     _memory   = transform.parent.GetComponent <CreatureMemory>();
     myBiology = transform.parent.GetComponent <Biology>();
 }