private bool IsAngleOfEcosystem(Vector3 position, EEcosystem ecosystem) { float angle = Vector3.SignedAngle(transform.up, position - transform.position, Vector3.forward); //Debug.Log(angle); return(true); }
public void IsInArea(AnimalController animal) { EEcosystem ecosystem = EcosystemByAnimal[animal.GetAnimalType()]; if (!IsAngleOfEcosystem(animal.transform.position, ecosystem)) { animal.ChangeDirection(); } }
public PlanetControllerInfoEcosystem(int newStartAngle, int newEndAngle, EEcosystem newEcosystem) { StartAngle = newStartAngle; EndAngle = newEndAngle; ecosystem = newEcosystem; }