void ActualiceVisonCone() { visionC.angle = viewAngle; visionC.GetComponent <Projector>().orthographicSize = viewDistance; switch (enemy.state) { case EnemyStates.PATROL: visionC.color = Color.green; break; case EnemyStates.ALERT: visionC.color = Color.yellow; break; case EnemyStates.KILLER: visionC.color = Color.red; break; } }