public void playMap(bool open) { newAudioSource = Instantiate(audioSource); if (open) { EffectNormal(newAudioSource.source, mapOpen); } else { EffectNormal(newAudioSource.source, mapClose); } }
public void playInventory(bool open) { newAudioSource = Instantiate(audioSource); if (open) { EffectNormal(newAudioSource.source, inventoryOpen); } else { EffectNormal(newAudioSource.source, inventoryClose); } }
public void playDialogue(bool open) { newAudioSource = Instantiate(audioSource); if (open) { EffectNormal(newAudioSource.source, dialogueOpen); } else { EffectNormal(newAudioSource.source, dialogueClose); } }
public void spawnSnowAmbience() { if (ambienceSource != null) { if (ambienceSource.source.clip != snowAmbience) { Destroy(ambienceSource.gameObject); ambienceSource = Instantiate(audioSource); Ambience(ambienceSource.source, snowAmbience); } } else { ambienceSource = Instantiate(audioSource); Ambience(ambienceSource.source, snowAmbience); } }
public void spawnJungleAmbience() { if (ambienceSource != null) { if (ambienceSource.source.clip != jungleAmbience) { Destroy(ambienceSource.gameObject); ambienceSource = Instantiate(audioSource); Ambience(ambienceSource.source, jungleAmbience); } } else { ambienceSource = Instantiate(audioSource); Ambience(ambienceSource.source, jungleAmbience); ambienceSource.transform.SetParent(this.transform); } }
public void playPlayerDeath() { newAudioSource = Instantiate(audioSource); newAudioSource.transform.SetParent(this.transform); EffectNormal(newAudioSource.source, playerDeath); }
public void playHighlightButton() { newAudioSource = Instantiate(audioSource); EffectPitched(newAudioSource.source, buttonHighlight); }
public void playBossDeath() { newAudioSource = Instantiate(audioSource); EffectNormal(newAudioSource.source, bossDeath); }
public void destroyAmbience() { Destroy(ambienceSource.gameObject); ambienceSource = null; }
public void playDash() { newAudioSource = Instantiate(audioSource); EffectNormal(newAudioSource.source, dash); }
public void playMelee() { newAudioSource = Instantiate(audioSource); EffectPitched(newAudioSource.source, melee); }
public void playCoins() { newAudioSource = Instantiate(audioSource); EffectPitched(newAudioSource.source, coins[Random.Range(0, coins.Count)]); }
public void playJump() { newAudioSource = Instantiate(audioSource); EffectNormal(newAudioSource.source, jump); }
public void playPlayerHit() { newAudioSource = Instantiate(audioSource); EffectNormal(newAudioSource.source, playerDamage); }
public void playEnemyHit() { newAudioSource = Instantiate(audioSource); EffectNormal(newAudioSource.source, enemyDamage); }
public void playWoodStep() { newAudioSource = Instantiate(audioSource); EffectPitched(newAudioSource.source, woodFootsteps[Random.Range(0, woodFootsteps.Count)]); }
public void playDrop() { newAudioSource = Instantiate(audioSource); EffectPitched(newAudioSource.source, drop); }
public void playEat() { newAudioSource = Instantiate(audioSource); EffectPitched(newAudioSource.source, eat); }
public void playButtonTap() { newAudioSource = Instantiate(audioSource); EffectNormal(newAudioSource.source, buttonTap); }
public void playPickup() { newAudioSource = Instantiate(audioSource); EffectNormal(newAudioSource.source, pickup); }
public void playRanged() { newAudioSource = Instantiate(audioSource); EffectNormal(newAudioSource.source, ranged); }
public void playEnemyDeath() { newAudioSource = Instantiate(audioSource); EffectNormal(newAudioSource.source, enemyDeath[Random.Range(0, enemyDeath.Count)]); }
public static GameObject Instantiate(ENTITY e) { GameObject entityObject; switch (e.Classname) { case "action_animate": { entityObject = AnimateAction.Instantiate(e); break; } case "action_move": { entityObject = MoveAction.Instantiate(e); break; } case "action_rotate": { entityObject = RotateAction.Instantiate(e); break; } case "action_sequence": { entityObject = ActionSequence.Instantiate(e); break; } case "action_sound": { entityObject = SoundAction.Instantiate(e); break; } case "action_wait": { entityObject = WaitAction.Instantiate(e); break; } case "audio_source": { entityObject = AudioSourceObject.Instantiate(e); break; } case "dream_environment": { entityObject = DreamEnvironment.Instantiate(e); break; } case "!map": { entityObject = MapObject.Instantiate(e); break; } case "!model": { entityObject = ModelObject.Instantiate(e); break; } case "music_controller": { entityObject = MusicController.Instantiate(e); break; } case "player_spawn": { entityObject = PlayerSpawn.Instantiate(e); break; } case "target": { entityObject = Target.Instantiate(e); break; } case "trigger_link": { entityObject = TriggerLink.Instantiate(e); break; } case "trigger_sequence": { entityObject = TriggerSequence.Instantiate(e); break; } case "trigger_sound": { entityObject = TriggerSound.Instantiate(e); break; } case "trigger_teleport": { entityObject = TriggerTeleport.Instantiate(e); break; } default: { Debug.LogWarning("Could not instantiate entity with classname " + e.Classname); entityObject = new GameObject(e.Classname); break; } } return(entityObject); }
private void Start() { Ambience(startingAmbience.source, woodsAmbience); ambienceSource = startingAmbience; }