Advertisement
Guest User

ShipInputControllerPublisher

a guest
Aug 23rd, 2019
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class ShipInputControllerPublisher : MonoBehaviour
  6. {
  7.  
  8.     private ShipInputController inputController;
  9.  
  10.     public void Start()
  11.     {
  12.         inputController = GetComponent<ShipInputController>();
  13.     }
  14.  
  15.  
  16.     public void Update()
  17.     {
  18.         inputController.horizontal = Input.GetAxis("Controller_Left_Horizontal");
  19.         inputController.vertical = Input.GetAxis("Controller_Left_Vertical");
  20.     }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement