public override void Start() { EntityManager.Instance.RegisterEntity(this); cSteeringWander = GetComponent <UnitySteer.Behaviors.SteerForWander>(); cSteeringPursuit = GetComponent <UnitySteer.Behaviors.SteerForPursuit>(); animator = GetComponent <Animator>(); biped = GetComponent <UnitySteer.Behaviors.Biped>(); rb = GetComponent <Rigidbody>(); audio = GetComponent <AudioSource>(); target = null; targets = new HashSet <BaseGameEntity>(); cSteeringWander.enabled = true; cSteeringPursuit.enabled = false; animator.SetFloat("MoveSpeed", 0); }
public override void Start() { EntityManager.Instance.RegisterEntity(this); cSteeringWander = GetComponent <UnitySteer.Behaviors.SteerForWander>(); cSteeringEvasion = GetComponent <UnitySteer.Behaviors.SteerForEvasion>(); cSteeringCohesion = GetComponent <UnitySteer.Behaviors.SteerForNeighborGroup>(); animator = GetComponent <Animator>(); biped = GetComponent <UnitySteer.Behaviors.Biped>(); biped.MaxSpeed = normalSpeed; rb = GetComponent <Rigidbody>(); audio = GetComponent <AudioSource>(); cSteeringWander.enabled = true; cSteeringEvasion.enabled = false; cSteeringCohesion.enabled = true; animator.SetFloat("MoveSpeed", 0); //timeForNextReproduction = reproductionCooldown; timeForNextReproduction = 0; }
private void Awake() { currTime = 0f; wanderUS = GetComponent<SteerForWander> (); avoidUS = GetComponent<SteerForSphericalObstacles> (); }
private void Awake() { currTime = 0f; wanderUS = GetComponent <SteerForWander> (); avoidUS = GetComponent <SteerForSphericalObstacles> (); }