예제 #1
0
        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();
        }
예제 #3
0
    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>();
    }
예제 #4
0
 public VisualText(string registeredFontName = null)
 {
     SetRegisteredFontName(registeredFontName);
     Position = new MovementBehaviour();
     Alpha    = new AlphaBehaviour();
     Rotation = new RotationBehaviour();
     Color    = Color.White;
     Scale    = Vector2.One;
 }
예제 #5
0
 /// <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));
 }
예제 #6
0
 private void OnEnable()
 {
     rotationBehaviour = GetComponent <RotationBehaviour>();
     requestHandler.OnSpinnerToggleRotationRequest += OnSpinnerToggleRotationRequest;
 }
예제 #7
0
 // Use this for initialization
 void Awake()
 {
     instance = this;
 }