//생성시 실행 private void Awake() { if (SoundManage.instance == null) { SoundManage.instance = this; } }
public override void LoadContent() { Image = ImageManage.GetSImage("help.png"); ok.Image = ImageManage.GetSImage("button01"); messages[0].Location = Alignment.GetMXFAlignment(ContentAlignment.MiddleRight, size, messages[0].Size); /*messages[1].Location = new Point(0, TitleSize + 50); * messages[2].Location = new Point(size.Width - messages[2].Size.Width, TitleSize + 50); * messages[3].Location = new Point((size.Width - messages[3].Size.Width) / 2, messages[2].Location.Y + messages[2].Size.Height + 10); * messages[5].Location = new Point(0, messages[3].Location.Y + messages[3].Size.Height + 10); * messages[6].Location = new Point(size.Width - messages[6].Size.Width, messages[3].Location.Y + messages[3].Size.Height + 10); * messages[4].Location = new Point((size.Width - messages[4].Size.Width) / 2, messages[6].Location.Y + messages[6].Size.Height + 10); * messages[7].Location = new Point(0, messages[4].Location.Y + messages[4].Size.Height + 10); * messages[8].Location = new Point(size.Width - messages[8].Size.Width, messages[4].Location.Y + messages[4].Size.Height + 10); */ time.Location = new Point(border_Left.Size.Width + 10, border_Top.Size.Height + 10); { for (int i = 0; i < Charas.Count; i++) { Charas["cursor" + i.ToString()].Location = new Point(50 + 150 * (i % 6), border_Top.Size.Height + time.Size.Height + 50 + 180 * (i / 6)); charasDict.Add(new Point(i % 6, i / 6), "cursor" + i.ToString()); } } sounds["hacking"] = SoundManage.GetSound("hacking.wav"); sounds["hacking"].SetSELoopPlay(true); sounds["button"] = SoundManage.GetSound("button.wav"); base.LoadContent(); }
public override void LoadContent() { image = ImageManage.GetSImage("button03"); sounds["click"] = SoundManage.GetSound("click.wav"); sounds["enter"] = SoundManage.GetSound("enter.wav"); base.LoadContent(); }
public override void LoadContent() { Image = ImageManage.GetSImage("stagefield.png"); sounds["antiviruswin"] = SoundManage.GetSound("antiviruswin.wav"); sounds["viruswin"] = SoundManage.GetSound("viruswin.wav"); base.LoadContent(); }
public override void LoadContent() { endText.Location = ((size - endText.Size) / 2).ToPoint(); Image = ImageManage.GetSImage("login_logout.png"); sounds["logout"] = SoundManage.GetSound("logout.wav"); base.LoadContent(); }
public override void LoadContent() { /*closeButton.BDText.ForeColor = System.Drawing.Color.Yellow; * closeButton.EnterColor = Color.Blue; * closeButton.NormalColor = Color.White * 0.0f;*/ sounds["button"] = SoundManage.GetSound("button.wav"); base.LoadContent(); }
public bool queue(SoundManage.SoundData data) { data.soundTime = 30; data.elapsedTime = 0; data.isPrePrio = true; data.isTrigger = true; queueList.Add(data); return true; }
public override void LoadContent() { ok.Image = ImageManage.GetSImage("button01"); cancel.Image = ImageManage.GetSImage("button01"); sounds["warning01"] = SoundManage.GetSound("warning01.wav"); sounds["warning02"] = SoundManage.GetSound("warning02.wav"); sounds["warning02"].SetSELoopPlay(true); sounds["button"] = SoundManage.GetSound("button.wav"); base.LoadContent(); }
void Start() { som = GameObject.FindGameObjectWithTag("SoundManager").GetComponent <SoundManage>(); sm = GameObject.FindGameObjectWithTag("GameController").GetComponent <ScoreManager>(); ps = GetComponent <ParticleSystem>(); reel = gameObject.GetComponentInParent <MouseReel>(); bounce_force = Random.Range(min_force, max_force); sprend.sprite = sprites[Random.Range(0, sprites.Length)]; rb.AddForce(Vector2.up * bounce_force * 100f, ForceMode2D.Impulse); }
public override void OnEnter() { SoundManage musicController = SoundManage.Instance; if (musicController != null) { musicController.StopMusic(); } Continue(); }
private void Awake() { if (soundInstance != null && soundInstance != this) { Destroy(this.gameObject); } else { soundInstance = this; } }
private void OnTriggerEnter2D(Collider2D collision) { GameObject temp = collision.gameObject; objValueScript tempObjScript = temp.GetComponent <objValueScript>(); if (temp.layer == hitlayer) { //add points to curreny based on value from obj or remove points based on value from obj if (temp.tag == "Obstacle" && anim.GetBool("invincible")) { //ignore the damage taken and destroy the obstacle and add some JUICINESSS //later on give that so it absorb parts animation or lookness despawnScr.removeFromActive(temp); tempObjScript.destroyObj(gameObject); SoundManage.playAudioClip(CLIP_ENUM.BLOCK); } else { float rValue = tempObjScript.returnValue(); if (rValue < 0) { if (helmetOn) { rValue -= (-helmetDmgReducer); //reduce dmg by 2 SoundManage.playAudioClip(CLIP_ENUM.HARDHAT); } else { SoundManage.playAudioClip(CLIP_ENUM.DESTROY); } birdParticle.Play(); cameraMain.GetComponent <camChake>().CameraShake(); } else { SoundManage.playAudioClip(CLIP_ENUM.COLLECT); } partsCount += rValue; //thehudscript.UpdateJunkCounter(partsCount); NO HUD YET if (temp.tag != "Metro") { despawnScr.removeFromActive(temp); Destroy(temp); } else { featherParts.Play(); SoundManage.playAudioClip(CLIP_ENUM.METROHIT); } } } }
public override void OnEnter() { SoundManage musicController = SoundManage.Instance; if (musicController != null) { float startTime = Mathf.Max(0, AtTime); musicController.PlayMusic(MusicClip, startTime); } Continue(); }
public void birdUp() { if (canFlap == true && birdStats.checkDead() != true) { SoundManage.playAudioClip(CLIP_ENUM.FLAP); setGuard(false); canFlap = false; Debug.Log("FLAP"); birdPhysics.velocity *= 0; birdPhysics.AddForce(new Vector2(0, verticalUpSpeed), ForceMode2D.Impulse); //verticalUpSpeed * birdTransform.up } }
// Start is called before the first frame update void Start() { if (SceneManager.GetActiveScene().name == "SelectScene" || SceneManager.GetActiveScene().name == "SelectSceneH") { canvas = GameObject.Find("Canvas"); canvas.SetActive(true); startButton = GameObject.Find("StartButton"); startButton.SetActive(false); selectCanvas = GameObject.Find("SelectCanvas"); selectCanvas.SetActive(false); } audioSource = GameObject.Find("SoundManage").GetComponent <SoundManage>(); }
// Start is called before the first frame update void Start() { One = true; Qn = true; next = false; refObj = GameObject.Find("CloudFactory"); cf = refObj.GetComponent <CloudFactory>(); this.question = GameObject.Find("Question"); this.choice1 = GameObject.Find("Choice1"); this.choice2 = GameObject.Find("Choice2"); this.choice3 = GameObject.Find("Choice3"); this.player = GameObject.Find("player"); audioSource = GameObject.Find("SoundManage").GetComponent <SoundManage>(); }
void Start() { anim = GetComponent <Animator>(); rb2d = GetComponent <Rigidbody2D>(); polygonCollider2D = GetComponent <PolygonCollider2D>(); boxCollider2D = GetComponent <BoxCollider2D>(); cameraScript = FindObjectOfType <CameraScript>(); player = GameObject.Find("Player"); audioPlayer = FindObjectOfType <SoundManage>(); game = player.AddComponent <GameActions>(); }
protected override void Awake() { base.Awake(); musicController = SoundManage.Instance; arrow.gameObject.SetActive(false); CharTalk = new Image[] { CharTalk_0, CharTalk_1, CharTalk_2, CharTalk_3 }; for (int i = 0; i < 4; i++) { portrait[i].image = CharTalk[i]; //将portrait中的image赋值为对话框中的image CharTalk[i].gameObject.SetActive(false); //初始的四个对话框不显示 } MainBackground.gameObject.SetActive(false); }
void Start() { if (!instance) { instance = this; DontDestroyOnLoad(gameObject); //add delegate to sceneLoaded for switching scenes SceneManager.sceneLoaded += OnSceneLoaded; } else { Destroy(gameObject); } MyPlayListIterator = 0; }
// Start is called before the first frame update void Awake() { //Check if there is already an instance of SoundManager if (instance == null) { //if not, set it to this. instance = this; } //If instance already exists: else if (instance != this) { //Destroy this, this enforces our singleton pattern so there can only be one instance of SoundManager. Destroy(gameObject); } //Set SoundManager to DontDestroyOnLoad so that it won't be destroyed when reloading our scene. DontDestroyOnLoad(gameObject); }
public override void OnEnter() { SoundManage musicController = SoundManage.Instance; if (musicController != null) { if (Lower) { musicController.LowerBGM(); } else if (Restore) { musicController.NormalBGM(); } else { musicController.SetBGMVolume(Volume); } } Continue(); }
public override void OnEnter() { if (soundClip == null) { Continue(); return; } SoundManage musicController = SoundManage.Instance; if (musicController != null) { musicController.PlaySound(soundClip, volume); } if (waitUntilFinished) { Invoke("DoWait", soundClip.length); } else { Continue(); } }
// Start is called before the first frame update void Start() { anim = GameObject.Find("player").GetComponent <Animator>(); audioSource = GameObject.Find("SoundManage").GetComponent <SoundManage>(); }
// Use this for initialization void Start() { musicManage = GameObject.FindObjectOfType <SoundManage>(); volumeControl.value = PlayerPrefsManage.GetMasterVolume(); SoundFXCOntrol.value = PlayerPrefsManage.GetSoundFXVolume(); }
private void Awake() { Instance = this; }
public override void LoadContent() { trailImage = ImageManage.GetSImage("trail.png"); sounds["death"] = SoundManage.GetSound("Player_Death.wav"); base.LoadContent(); }
// Start is called before the first frame update void Start() { anim = GetComponent <Animator>(); rb = GetComponent <Rigidbody2D>(); audioSource = GameObject.Find("SoundManage").GetComponent <SoundManage>(); }
public override void LoadContent() { Image = ImageManage.GetSImage("elasticitywall.png"); sounds["elasticitywall"] = SoundManage.GetSound("elasticitywall.wav"); base.LoadContent(); }
private void Start() { pms = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerLaunch>(); som = GameObject.FindGameObjectWithTag("SoundManager").GetComponent <SoundManage>(); }
void Awake() { if(_instance == null) _instance = GetComponent< MainManage >(); Bullet = GetComponentInChildren< BulletManage > (); Record = GetComponentInChildren< RecordManage > (); Bonus = GetComponentInChildren< BonusManage > (); Player = GetComponentInChildren< PlayerControl > (); Enemy = GetComponentInChildren< EnemyManage > (); Sound = GetComponentInChildren< SoundManage > (); _shoot = Player.GetComponent< PlayerShoot > (); Output = GameObject.Find ("Output").GetComponent< UILabel >(); }
void Awake() { inst = this; DontDestroyOnLoad(this); INIT(); }
public override void LoadContent() { border = ImageManage.GetSImage("fileiconborder.png"); sounds["click"] = SoundManage.GetSound("click.wav"); base.LoadContent(); }