public void Start() { base.Start(); seekVelocityProvider = GetComponent <SeekVelocityProvider>(); if (seekVelocityProvider == null) { return; } wonderVelocityProvider = GetComponent <WonderVelocityProvider>(); if (wonderVelocityProvider == null) { return; } avoidEdgesVelocityProvider = GetComponent <AvoidEdgesVelocityProvider>(); if (avoidEdgesVelocityProvider == null) { return; } SetState(new WolfDefault(this)); }
public void Start() { base.Start(); fleeVelocityProvider = GetComponent <FleeVelocityProvider>(); if (fleeVelocityProvider == null) { return; } wonderVelocityProvider = GetComponent <WonderVelocityProvider>(); if (wonderVelocityProvider == null) { return; } avoidEdgesVelocityProvider = GetComponent <AvoidEdgesVelocityProvider>(); if (avoidEdgesVelocityProvider == null) { return; } SetState(new RabbitDefault(this)); }