/// <summary> /// Initializes the audio behaviour. /// </summary> /// <param name="footstepsSource"></param> /// <param name="jumpSource"></param> /// <param name="landSource"></param> public void Initialize(GoldPlayerController playerController, IGoldInput input, AudioSource footstepsSource, AudioSource jumpSource, AudioSource landSource) { PlayerController = playerController; PlayerInput = input; FootstepsSource = footstepsSource; JumpSource = jumpSource; LandSource = landSource; }
internal void ForceInitialize(IGoldInput input) { if (input != null) { PlayerInput = input; } OnInitialize(); HasBeenInitialized = true; }
/// <summary> /// Initialize the module. /// </summary> /// <param name="player">The player controller itself.</param> /// <param name="input">Input, if available.</param> public void Initialize(IGoldInput input) { // If the module has already been initialized, stop here. if (HasBeenInitialized) { return; } if (input != null) { PlayerInput = input; } OnInitialize(); HasBeenInitialized = true; }
/// <summary> /// Initialize the module. /// </summary> /// <param name="player">The player controller itself.</param> /// <param name="input">Input, if available.</param> public void Initialize(GoldPlayerController player, IGoldInput input) { // If the module has already been initialized, stop here. if (HasBeenInitialized) { return; } playerController = player; if (input != null) { playerInput = input; } OnInitialize(); HasBeenInitialized = true; }
/// <summary> /// Gets all the references the player needs. /// </summary> public virtual void GetReferences() { PlayerInput = gameObject.GetComponent <IGoldInput>(); controller = gameObject.GetComponent <CharacterController>(); }
public void Initialize(GoldPlayerController player, IGoldInput input) { }