void Awake() { controller = GetComponent <CharacterController>(); VikingControlsScript = GetComponent <VikingControls>(); vikingShipObject = GameObject.FindWithTag("Viking_Ship"); ShipBehaviourScript = vikingShipObject.GetComponentInChildren <ShipBehaviour>(); ShipInsideColliderScript = vikingShipObject.GetComponentInChildren <ShipInsideCollider>(); ShipLandingColliderScript = vikingShipObject.GetComponentInChildren <ShipLandingCollider>(); }
void Awake() { playerGameObject = GameObject.FindWithTag("Player"); player = playerGameObject.GetComponent <Transform>(); VikingControlsScript = playerGameObject.GetComponent <VikingControls>(); Viking_animScript = playerGameObject.GetComponent <VikingAnimator>(); vikingShipObject = GameObject.FindWithTag("Viking_Ship"); ShipInsideColliderScript = vikingShipObject.GetComponentInChildren <ShipInsideCollider>(); ShipLandingColliderScript = vikingShipObject.GetComponentInChildren <ShipLandingCollider>(); vikingShip = vikingShipObject.GetComponent <Transform>(); landingSpot = vikingShipObject.GetComponentInChildren <Transform>().GetChild(1).GetChild(2); }