private void Awake() { _inputs = FindObjectOfType <InputManager>(); var movable = new RotationBehaviour(this, _pointManager.CurrentPoint(), SwitchPoint, transform); SetPlayerBehaviour(movable); }
public TopDownCamera(Viewport viewport) { CurrentViewport = viewport; Zoom = 1.0f; Position = new MovementBehaviour(); Rotation = new RotationBehaviour(); }
private bool movementLocked = false; //if movement locked is false directionHousing is the current object then movement is allowed, if movement locked true opposite is true void Start() { currentObject = directionHousing; Vector3 tempRotation = new Vector3(0, 0, Random.Range(0, 360)); needleRotation = Quaternion.Euler(tempRotation); rotationScript = gameObject.GetComponent <RotationBehaviour>(); }
public VisualText(string registeredFontName = null) { SetRegisteredFontName(registeredFontName); Position = new MovementBehaviour(); Alpha = new AlphaBehaviour(); Rotation = new RotationBehaviour(); Color = Color.White; Scale = Vector2.One; }
/// <summary> /// Start skryptu - inicjalizacja flag, pobranie obiektów /// </summary> void Start() { flag = false; starttime = Time.time; rb = gameObject.GetComponent<Rigidbody>(); Physics.gravity = new Vector3(0f, -20.81f, 0f); strengthBar = (SilaBehaviour)FindObjectOfType(typeof(SilaBehaviour)); rotationBar = (RotationBehaviour)FindObjectOfType(typeof(RotationBehaviour)); }
private void OnEnable() { rotationBehaviour = GetComponent <RotationBehaviour>(); requestHandler.OnSpinnerToggleRotationRequest += OnSpinnerToggleRotationRequest; }
// Use this for initialization void Awake() { instance = this; }