// Use this for initialization void Start() { PlayerSongs ps = FindObjectOfType <PlayerSongs>(); ps.AddPowerListener(activationPower, Activate); currentTargetPosition = position1; Rigidbody2D _rigidBody = GetComponent <Rigidbody2D>(); }
// Use this for initialization void Start() { textComponent = GetComponent <Text>(); PlayerSongs songs = FindObjectOfType <PlayerSongs>(); songs.AddPowerListener(power, ToggleText); ToggleText(songs.IsPowerActive(power)); }
// Use this for initialization void Start() { PlayerSongs ps = FindObjectOfType <PlayerSongs>(); ps.AddPowerListener(activationPower, Activate); currentTargetPosition = position2; _rigidBody = GetComponent <Rigidbody2D>(); _tileMovement = GetComponent <TileMovement>(); _animator = GetComponent <Animator>(); }
// Use this for initialization void Start() { _animator = GetComponent <Animator>(); PlayerSongs ps = FindObjectOfType <PlayerSongs>(); ps.AddPowerListener(activationPower, Activate); spriteRenderer = GetComponent <SpriteRenderer>(); boxCollider = GetComponent <BoxCollider2D>(); Activate(false); }
// Use this for initialization void Start() { songs = FindObjectOfType <PlayerSongs>(); songs.AddPowerListener(PlayerPowers.Sadness, PlaySadness); songs.AddPowerListener(PlayerPowers.Fear, PlayFear); songs.AddPowerListener(PlayerPowers.Anger, PlayAnger); sourceAmbientApathy = AddAudioSourceForClip(clipAmbientApathy); sourceAmbientNeutral = AddAudioSourceForClip(clipAmbientNeutral); sourcePowers = new AudioSource[3]; playingEmotion = new bool[3]; for (int i = 0; i < 3; i++) { sourcePowers[i] = AddAudioSourceForClip(tracks[i]); playingEmotion[i] = false; } if (sourceAmbientApathy != null) { sourceAmbientApathy.volume = 1; } }