本文整理汇总了C#中Combat.SetStats方法的典型用法代码示例。如果您正苦于以下问题:C# Combat.SetStats方法的具体用法?C# Combat.SetStats怎么用?C# Combat.SetStats使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Combat
的用法示例。
在下文中一共展示了Combat.SetStats方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
//Initilization
protected override void Start()
{
//start living entity base class
base.Start();
startingHealth = baseHealth;
switch (dietinfo) {
case 'h':
dietType = Diet.Herbivorous;
break;
case 'o':
dietType = Diet.Omnivorous;
break;
case 'p':
dietType = Diet.Carnivorous;
break;
}
//Action marker setup
skinDefalt = GetComponent<Renderer>().material;
defaltColor = skinDefalt.color;
//navagation set up
pathfinder = GetComponent<NavMeshAgent>();
pathfinder.acceleration = acceleration;
pathfinder.speed = movmentSpeed;
currentState = State.Idle;
currentTargetList = new List<Transform>();
currentTargetType = targetType.Water;
//Combat set up
animatCombat = GetComponent<Combat>();
attackDistanceThreshold = attackRange / 1.2f;
animatCombat.SetStats(attackRange, attackAccuracy, attackDamage);
//Sence Components set up
//sight
animatSight = GetComponent<Sight>();
animatSight.SetStats(sightRange);
//olfaction
animatOlfaction = GetComponent<Olfaction>();
animatOlfaction.SetStats(olfactionRange, olfactionAccuracy);
//audition
animatAudition = GetComponent<Audition>();
animatAudition.SetStats(hearingRange);
//Metabolism
hunger = (int)(baseSatation/1.5);
thirst = (int)(baseHydration/1.5);
StartCoroutine(Metabolism());
//Cognition
spawnOrigin = GetComponentInParent<Spawner>();
noOfTargetsConsumed = 0;
StartCoroutine(DecisionBlock());
StartCoroutine(ActionBlock());
}