Esempio n. 1
0
    void Awake()
    {
        enemyAI       = GetComponent <IEnemyAI>();
        movementInput = GetComponent <IMovementInput>();

        OnValidate();
    }
Esempio n. 2
0
    void Awake()
    {
        enemyAI       = GetComponent <IEnemyAI>();
        movementInput = GetComponent <IMovementInput>();

        myCollider = GetComponent <Collider>();
    }
Esempio n. 3
0
 void Start()
 {
     itemContainer  = invintory.GetComponent <IItemContainer>();
     move           = GetComponent <IMovementInput>();
     invintoryInput = GetComponent <IInvintoryInput>();
     rb             = GetComponent <Rigidbody2D>();
 }
        public override void Initialize(BehaviourProcessor behaviourProcessor)
        {
            base.Initialize(behaviourProcessor);

            actorMovement = behaviourProcessor.GetComponent <ActorMovement>();
            movementInput = actorMovement.MovementInput;
            actorMovement.OnInputChange += SetInput;
        }
Esempio n. 5
0
 private void Start()
 {
     playerAnimations               = GetComponent <PlayerAnimations>();
     playerMovement                 = GetComponent <PlayerMovement>();
     playerRenderer                 = GetComponent <PlayerRenderer>();
     playerAiInteractions           = GetComponent <PlayerAIInteractions>();
     movementInput                  = GetComponent <IMovementInput>();
     movementInput.OnInteractEvent += () => playerAiInteractions.Interact(playerRenderer.IsSpriteFlipped);
 }
Esempio n. 6
0
 // Start is called before the first frame update
 void Start()
 {
     _movement      = GetComponent <IMovement>();
     _movementInput = GetComponent <IMovementInput>();
 }
Esempio n. 7
0
 public FreeFormMovement(Rigidbody2D rigidbody, IMovementInput movementInput) : base(rigidbody, movementInput)
 {
 }
Esempio n. 8
0
 private PatrolEnemyMovementController(IMovementInput movementInput, UnitMoveData moveData)
     : base(movementInput, moveData)
 {
 }
 protected CommonMovementController(IMovementInput movementInput, UnitMoveData moveData)
 {
     MovementInput = movementInput;
     MoveData      = moveData;
 }
Esempio n. 10
0
 public BaseMovement(Rigidbody2D rigidbody, IMovementInput movementInput)
 {
     this.rigidbody     = rigidbody;
     this.movementInput = movementInput;
 }
Esempio n. 11
0
 private HeroMovementController(IMovementInput movementInput, UnitMoveData moveData)
     : base(movementInput, moveData)
 {
 }
Esempio n. 12
0
 private void Awake()
 {
     inputRef = GetComponent <IMovementInput>();
     rb       = GetComponent <Rigidbody>();
 }
Esempio n. 13
0
 // Use this for initialization
 void Start()
 {
     rb            = this.GetComponent <Rigidbody2D> ();
     movementInput = this.GetComponent <IMovementInput> ();
 }
 private void InitValues()
 {
     m_Input = InputManager.Instance;
 }
Esempio n. 15
0
    private bool isCreated; //Temporal

    private void Start()
    {
        input = GetComponent <IMovementInput>();
    }
		/// <summary>
		/// Builds a normalized <see cref="Vector3"/> based on the input. Relative to the transform by default.
		/// </summary>
		/// <param name="input"><see cref="IMovementInput"/> service.</param>
		/// <param name="relativeToTransform">(Default: true) Indicates if this should be relative to the transform.</param>
		/// <returns>A normalized <see cref="Vector3"/> representing a movement direction based on axis input.</returns>
		public Vector3 BuildDirection(IMovementInput input, bool relativeToTransform = true)
		{
			return BuildDirection(input.VerticalAxis, input.HorizontalAxis, relativeToTransform);
		}
 /// <summary>
 /// Builds a normalized <see cref="Vector3"/> based on the input. Relative to the transform by default.
 /// </summary>
 /// <param name="input"><see cref="IMovementInput"/> service.</param>
 /// <param name="relativeToTransform">(Default: true) Indicates if this should be relative to the transform.</param>
 /// <returns>A normalized <see cref="Vector3"/> representing a movement direction based on axis input.</returns>
 public Vector3 BuildDirection(IMovementInput input, bool relativeToTransform = true)
 {
     return(BuildDirection(input.VerticalAxis, input.HorizontalAxis, relativeToTransform));
 }
Esempio n. 18
0
 void Awake()
 {
     input = GetComponent <IMovementInput>();
     body  = GetComponent <Rigidbody>();
 }
Esempio n. 19
0
 void Awake()
 {
     input = GetComponent <IMovementInput>();
 }
Esempio n. 20
0
 public BaseMovement(Rigidbody2D rigidbody)
 {
     this.rigidbody     = rigidbody;
     this.movementInput = null;
 }
Esempio n. 21
0
 protected virtual void Awake()
 {
     movementInput = GetComponent <IMovementInput>();
 }
Esempio n. 22
0
 public MovementLogic(IMovementInput inputInfo)
 {
     this.InputInfo = inputInfo;
 }
 private void SetInput(IMovementInput movementInput) =>
 this.movementInput = movementInput;
Esempio n. 24
0
    private bool isCreated; //Temporal

    private void Start()
    {
        audioSource = GetComponentInChildren <AudioSource>();
        input       = GetComponent <IMovementInput>();
    }
Esempio n. 25
0
 private HeroWeaponInput(IMovementInput movementInput, UnitLocator locator, Transform transform)
 {
     _movementInput = movementInput;
     _locator       = locator;
     _transform     = transform;
 }