void Update() { if (snakeParameters.SnakeHead == null) { return; } Move(); Rotate(); snakeParameters.ControlGlow(glow); transform.localScale = new Vector3(snakeParameters.referenceScale, snakeParameters.referenceScale, snakeParameters.referenceScale); }
private void Update() { if (snakeParameters.dieing) { return; } snakeParameters.ControlGlow(glow); transform.localScale = new Vector3(snakeParameters.referenceScale, snakeParameters.referenceScale, snakeParameters.referenceScale); Move(); if (Vector3.Distance(transform.position, Vector3.zero) <= 500) { Rotate(); } else { RotateTowardsCenter(); } }