// Use this for initialization void Start() { manager = GetComponent <DragonManager>(); idleFly = GetComponent <DragonControllerIdleFly>(); if (InputManager.Devices.Count <= playerIndex) { return; } device = InputManager.Devices[playerIndex]; }
public float leftStickXValue = 0.1f; //The value of the left stick X at which the dragon will 'bank'. // Use this for initialization void Start() { flyController = GetComponent <DragonControllerFly>(); groundController = GetComponent <DragonControllerGround>(); idleFlyController = GetComponent <DragonControllerIdleFly>(); stats = GetComponent <DragonStats>(); rb = GetComponent <Rigidbody>(); animator = GetComponent <Animator>(); flyController.enabled = false; idleFlyController.enabled = true; groundController.enabled = false; //if (InputManager.Devices.Count <= playerIndex) //{ // return; //} device = InputManager.Devices[playerIndex]; }