private void Awake() { if (m_instance != null) { Destroy(gameObject); return; } m_instance = this; DontDestroyOnLoad(gameObject); m_sources = transform.Find("Sounds").GetComponentsInChildren <AudioSource>(); m_musicSource1 = transform.Find("Music1").GetComponent <AudioSource>(); m_musicSource2 = transform.Find("Music2").GetComponent <AudioSource>(); m_subscriberList.Add(new Event <SettingsChangedEvent> .Subscriber(OnSettingsChanges)); m_subscriberList.Add(new Event <PlayMusicEvent> .Subscriber(PlayMusic)); m_subscriberList.Add(new Event <IsPlayingMusicEvent> .Subscriber(IsPlayingMusic)); m_subscriberList.Add(new Event <StopMusicEvent> .Subscriber(StopMusic)); m_subscriberList.Add(new Event <PlaySoundEvent> .Subscriber(PlaySound)); m_subscriberList.Add(new Event <IsPlayingSoundEvent> .Subscriber(IsPlayingSound)); m_subscriberList.Add(new Event <PlaySoundLoopEvent> .Subscriber(PlayLoop)); m_subscriberList.Add(new Event <StopSoundLoopEvent> .Subscriber(StopLoop)); m_subscriberList.Subscribe(); }
protected override void onAwake() { m_subscriberList.Add(new Event <MonsterEatenEvent> .Subscriber(onMonsterDie)); m_subscriberList.Subscribe(); m_animator = GetComponent <Animator>(); }
private void Awake() { m_subscriberList.Add(new Event <ObjectPickedEvent> .Subscriber(OnObjectPicked)); m_subscriberList.Subscribe(); m_instance = this; }
public DataMaster() { _subscriberList.Add(new Event <PlayerHaveJumped> .Subscriber(OnJump)); _subscriberList.Subscribe(); Load(); }
void Awake() { _subscriberList.Add(new Event <UpdateAchievementUIEvent> .Subscriber(UpdateAchievementUI)); _subscriberList.Add(new Event <ProgressAchievementEvent> .Subscriber(UpdateAchievementProgress)); _subscriberList.Add(new Event <RefreshAchievementsEvent> .Subscriber(RefreshMe)); _subscriberList.Subscribe(); }
private void Awake() { m_subscriberList.Add(new Event <ButtonPressEvent> .Subscriber(OnMenuSelect)); m_subscriberList.Subscribe(); m_instance = this; }
void Awake() { m_subscriberList.Add(new Event <GoldChangedEvent> .Subscriber(OnGoldChange)); m_subscriberList.Subscribe(); m_texts = GetComponentsInChildren <Text>(); }
private void Awake() { m_angle = transform.rotation.eulerAngles; m_subscriberList.Add(new Event <GenerationFinishedEvent> .Subscriber(onGenerationEnd)); m_subscriberList.Subscribe(); }
void OnEnable() { _myButton = gameObject.GetComponent <Button> (); _subscriberList.Add(new Event <ShopResetEvent> .Subscriber(Refresh)); _subscriberList.Subscribe(); Refresh(new ShopResetEvent()); }
void Awake() { G.Sys.powerupManager = this; _subscriberList.Add(new Event <PowerupCollectedEvent> .Subscriber(OnPowerupCollect)); _subscriberList.Subscribe(); }
private void Awake() { m_subscriberList.Add(new Event <CameraEndEvent> .Subscriber(onCameraEnd)); m_subscriberList.Subscribe(); m_source = GetComponent <AudioSource>(); }
private void Awake() { m_subscriberList.Add(new Event <WeaponTargetChangeEvent> .Subscriber(OnCursorMove)); m_subscriberList.Subscribe(); m_renderer = GetComponentInChildren <SpriteRenderer>(); }
private void Awake() { m_subscriberList.Add(new Event <CamShakeEvent> .Subscriber(OnCamShake)); m_subscriberList.Subscribe(); m_camTransform = transform.Find("Cam"); }
private void Awake() { m_instance = this; m_subscriberList.Add(new Event <DoorUsedEvent> .Subscriber(OnDoorUse)); m_subscriberList.Subscribe(); }
protected override void onAwake() { m_animator = GetComponent <Animator>(); m_subscriberList.Add(new Event <BossDieEvent> .Subscriber(onBossDie)); m_subscriberList.Add(new Event <DieEvent> .Subscriber(onDie)); m_subscriberList.Subscribe(); }
void Start() { m_subscriberList.Add(new Event <DieEvent> .Subscriber(onDeath)); m_subscriberList.Subscribe(); gameObject.SetActive(false); }
void Awake() { _subscriberList.Add(new Event <StartCountdownEvent> .Subscriber(onCountdownStart)); _subscriberList.Add(new Event <PauseEvent> .Subscriber(onPause)); _subscriberList.Add(new Event <EndLevelEvent> .Subscriber(onPlayerFinish)); _subscriberList.Add(new Event <CollectEvent> .Subscriber(onCollect)); _subscriberList.Subscribe(); }
private void Awake() { DontDestroyOnLoad(gameObject); m_source = GetComponent <AudioSource>(); m_subscriberList.Add(new Event <PlaySoundEvent> .Subscriber(onPlaySound)); m_subscriberList.Subscribe(); }
void Awake() { G.Sys.gameManager = this; _subscriberList.Add(new Event <PlayerKillEvent> .Subscriber(OnPlayerKill)); _subscriberList.Add(new Event <TextTriggerEvent> .Subscriber(OnTextTrigger)); _subscriberList.Subscribe(); }
void Awake() { m_target = transform.position; m_subscriberList.Add(new Event <CameraTargetChangeEvent> .Subscriber(OnTargetMove)); m_subscriberList.Add(new Event <InstantMoveCameraEvent> .Subscriber(OnInstantMove)); m_subscriberList.Subscribe(); }
private void Awake() { m_subscriberList.Add(new Event <UpdateMinimapEvent> .Subscriber(OnMapUpdate)); m_subscriberList.Add(new Event <HideMapEvent> .Subscriber(OnHideMap)); m_subscriberList.Add(new Event <AllEnemyKilledEvent> .Subscriber(OnAllEnemyKill)); m_subscriberList.Add(new Event <EnemySpawnEvent> .Subscriber(OnEnemySpawn)); m_subscriberList.Subscribe(); }
private void Awake() { m_rigidbody = GetComponent <Rigidbody2D>(); m_animator = GetComponent <Animator>(); m_subscriberList.Add(new Event <ProcessFrameEvent> .Subscriber(OnFrame)); m_subscriberList.Subscribe(); }
private void Awake() { m_subscriberList.Add(new Event <FrameStatusChangedEvent> .Subscriber(OnStatusChange)); m_subscriberList.Add(new Event <ProcessFrameEvent> .Subscriber(OnFrame)); m_subscriberList.Subscribe(); m_pos = transform.position; }
private void Awake() { m_camera = GetComponentInChildren <Camera>(); m_subsctiberList.Add(new Event <AddScreenShakeEvent> .Subscriber(OnAddShake)); m_subsctiberList.Add(new Event <StopScreenShakeEvent> .Subscriber(OnStopShake)); m_subsctiberList.Subscribe(); }
void Awake() { _subscriberList.Add(new Event <PlayerMovedEvent> .Subscriber(OnPlayerMove)); _subscriberList.Add(new Event <InstantMoveCameraEvent> .Subscriber(OnInstantMove)); _subscriberList.Add(new Event <PauseRingEvent> .Subscriber(Pause)); _subscriberList.Add(new Event <InitializeEvent> .Subscriber(OnInit)); _subscriberList.Subscribe(); }
private void Awake() { m_animator = GetComponent <Animator>(); m_light = transform.Find("Light").gameObject; m_subscriberList.Add(new Event <AllEnemyKilledEvent> .Subscriber(OnAllEnemyKill)); m_subscriberList.Add(new Event <EnemySpawnEvent> .Subscriber(OnEnemySpawn)); m_subscriberList.Subscribe(); }
private void Awake() { m_CountLabel = transform.Find("CountLabel").GetComponent <Text>(); m_image = transform.Find("PhotoBack").Find("Photo").GetComponent <Image>(); m_CountLabel.gameObject.SetActive(false); m_subscriberList.Add(new Event <PhotoTakenEvent> .Subscriber(onPhotoTaken)); m_subscriberList.Subscribe(); }
void Start() { m_subscriberList.Add(new Event <ButtonTimeoutEvent> .Subscriber(onButtonTimeout)); m_subscriberList.Subscribe(); m_gameMap = GameObject.Find("GameMap"); m_fadePlane.gameObject.SetActive(false); LevelMap.instance.time = 0; }
private void Awake() { m_subscriberList.Add(new Event <TeleportPlayerEvent> .Subscriber(OnTeleport)); m_subscriberList.Add(new Event <GoldChangedEvent> .Subscriber(OnGoldGain)); m_subscriberList.Subscribe(); m_visual = transform.Find("Visual").gameObject; m_instance = this; }
void Awake() { G.Sys.chunkSpawner = this; _subscriberList.Add(new Event <CameraMovedEvent> .Subscriber(OnCameraMove)); _subscriberList.Add(new Event <InitializeEvent> .Subscriber(OnInitialize)); _subscriberList.Add(new Event <ResetEvent> .Subscriber(OnReset)); _subscriberList.Subscribe(); CreateChunkData(); }