void Start() { ManagerPause.SubscribeOnPauseGame(OnPauseGame); ManagerPause.SubscribeOnResumeGame(OnResumeGame); firstRun = false; Debug.Log("this is StarBullet"); }
void Start() { if (SaveManager.Instance.dataKlaus.isArcadeModeUnlock) { cpu.gameObject.SetActive(false); BarHack.gameObject.SetActive(false); VisualHack(); gameObject.SetActive(false); return; } else { cpu.onStartHack += OnStart; cpu.onCancelHack += OnCancel; } storeScaleBarHack = BarHack.localScale; BarHack.gameObject.SetActive(false); ManagerPause.SubscribeOnPauseGame(OnPauseGame); ManagerPause.SubscribeOnResumeGame(OnResumeGame); firstRun = false; LanguageManager languageManager = LanguageManager.Instance; languageManager.OnChangeLanguage += OnChangeLanguage; //Run the method one first time OnChangeLanguage(languageManager); }
void OnDisable() { ManagerPause.UnSubscribeOnPauseGame(OnPauseGame); ManagerPause.UnSubscribeOnResumeGame(OnResumeGame); materialTwen.Pause(); }
void OnDisable() { ManagerPause.UnSubscribeOnPauseGame(OnPauseGame); ManagerPause.UnSubscribeOnResumeGame(OnResumeGame); proCamera2D.enabled = false; }
void Start() { isEnabled = false; if (ManagerDoors.numberOfPair == NumberOfPair.CuatroXCuatro) { return; } doors = GameObject.FindObjectsOfType <Door> (); for (int i = 0; i < doors.Length; ++i) { if (character == doors [i].character) { doors [i].onCheckTruePair.Add(new Signal("setOnPower", gameObject)); break; } } ManagerPowers.Instance.onPowerTrue += onNotUse; ManagerPowers.Instance.onPowerFalse += onUse; ManagerPause.SubscribeOnPauseGame(onPaused); ManagerPause.SubscribeOnResumeGame(onResume); firstRun = false; }
void Start() { ManagerPause.SubscribeOnPauseGame(OnPauseGame); ManagerPause.SubscribeOnResumeGame(OnResumeGame); ManagerStop.SubscribeOnStopGame(OnStopGame); firstRun = false; }
public override void DoBeforeEntering() { bodyToForce.CanMove(false); anim.SetBool("Throw", false); anim.SetBool("isThrowing", true); anim.SetTrigger("ThrowTrigger"); _rigidbody2D.velocity = Vector2.zero; isThrowing = true; ManagerPause.SubscribeOnPauseGame(OnPauseGame); ManagerPause.SubscribeOnResumeGame(OnResumeGame); throwBody = false; if (OnStart != null) { OnStart(); } dir = GetDirection(); if (dir == Vector2.zero) { dir = Vector3.right; } DirForThrow = dir; Arrow.gameObject.SetActive(true); Arrow.rotation = Quaternion.Euler(Vector3.forward * Mathf.Rad2Deg * Mathf.Atan2(DirForThrow.y, DirForThrow.x)); }
void Start() { codePlayer.SetFunct(OnStartCode, OnCancelCode, OnFinishCode); ManagerPause.SubscribeOnPauseGame(OnPauseGame); ManagerPause.SubscribeOnResumeGame(OnResumeGame); firstRun = false; }
void Start() { ManagerTime.Instance.onTimeGameEnd += GameFinished; ManagerDoors.Instance.onVictory += GameFinished; firstRun = false; ManagerPause.SubscribeOnPauseGame(onPaused); ManagerPause.SubscribeOnResumeGame(onResume); }
void OnEnable() { if (!firstRun) { ManagerPause.SubscribeOnPauseGame(OnPauseGame); ManagerPause.SubscribeOnResumeGame(OnResumeGame); } }
void Start() { ManagerPause.SubscribeOnPauseGame(OnPauseGame); ManagerPause.SubscribeOnResumeGame(OnResumeGame); firstRun = false; store_HorizontalFollowSmoothness = proCamera2D.HorizontalFollowSmoothness; store_VerticalFollowSmoothness = proCamera2D.VerticalFollowSmoothness; }
public override void DoBeforeLeaving() { ManagerPause.UnSubscribeOnPauseGame(OnPauseGame); ManagerPause.UnSubscribeOnResumeGame(OnResumeGame); //rigidbody2D.isKinematic = false; anim.SetBool("TurnAround", false); anim.SetBool("TurnAroundElevator", false); }
void OnEnable() { if (!firstRun) { ManagerPause.SubscribeOnPauseGame(OnPauseGame); ManagerPause.SubscribeOnResumeGame(OnResumeGame); } StartCoroutine("StartParticle", TimeToStart); }
void OnEnable() { if (!firstRun) { ManagerPause.SubscribeOnPauseGame(OnPauseGame); ManagerPause.SubscribeOnResumeGame(OnResumeGame); } storeSpeed = effector.speed; }
void OnEnable() { if (!firstRun) { ManagerDoors.SubscribeOnVictory(ChangueOnVictory); ManagerPause.SubscribeOnPauseGame(onPaused); ManagerPause.SubscribeOnResumeGame(onResume); } }
public override void DoBeforeLeaving() { //rigidbody2D.isKinematic = false; anim.SetBool("isCrouch", false); collideHead.enabled = true; headGameObject.localPosition = positionNormal; ManagerPause.UnSubscribeOnPauseGame(OnPauseGame); ManagerPause.UnSubscribeOnResumeGame(OnResumeGame); }
void OnEnable() { if (SteamManager.Initialized) { m_GameOverlayActivated = Callback <GameOverlayActivated_t> .Create(OnGameOverlayActivated); } ManagerPause.SubscribeOnPauseGame(onPauseGame); ManagerPause.SubscribeOnResumeGame(onResumeGame); }
void OnLevelWasLoaded(int level) { onResumeGame(); if (level > 1) { ManagerPause.SubscribeOnPauseGame(onPauseGame); ManagerPause.SubscribeOnResumeGame(onResumeGame); } }
void OnEnable() { if (!firstRun) { ManagerTime.Instance.onTimeGameEnd += StopAllSound; ManagerPause.SubscribeOnPauseGame(onPaused); ManagerPause.SubscribeOnResumeGame(onResume); } }
void Start() { ManagerPause.SubscribeOnPauseGame(OnPauseGame); ManagerPause.SubscribeOnResumeGame(OnResumeGame); firstRun = false; startPos = transform.position; startRot = transform.rotation; storeGravityScale = rigidbody2D.gravityScale; }
public override void DoBeforeEntering() { //rigidbody2D.isKinematic = true; _rigidbody2D.velocity = Vector2.zero; anim.SetBool("TurnAround", true); anim.SetBool("isGround", true); anim.SetFloat("SpeedX", 0); ManagerPause.SubscribeOnPauseGame(OnPauseGame); ManagerPause.SubscribeOnResumeGame(OnResumeGame); }
public override void DoBeforeEntering() { // SI hay suscriptores a este evento, NO lanzar ataque if (LaunchPunchAction != null) { LaunchPunchAction(); fsm.PerformTransition(Transition.CrushToMove); return; } //rigidbody2D.isKinematic = true; rigidBody2D.velocity = Vector2.zero; store_GravityScale = rigidBody2D.gravityScale; rigidBody2D.gravityScale = 0; anim.SetBool("isCrushing", true); anim.SetTrigger("CrushTrigger"); ManagerPause.SubscribeOnPauseGame(OnPauseGame); ManagerPause.SubscribeOnResumeGame(OnResumeGame); anim.SetFloat("CrushDir", directionAxis); //Defino al direccion del golpe: if (directionAxis > inputOffset && canPuchUp)//arriba { typeC = TypeCrush.Upper; useForceUp = true; canPuchUp = false; timerPuchUp = false; moveState.SetIsNONWhenJump(); StartCoroutine("StartCrush", TimeToCrushUp); StartCoroutine(timerVar.StartTime(SetTimerPushUp, TimeToPushUp + TimeToCrushUp)); highHitSFX.Spawn(transform.position, transform.rotation); } else if (directionAxis < -1 * inputOffset)//abajo { typeC = TypeCrush.Down; isDown = true; moveState.RemoveLayerToWhatisGround("Obstacle"); StartCoroutine("StartCrush", TimeToCrushDown); lowHitSFX.Spawn(transform.position, transform.rotation); } else//middle { typeC = TypeCrush.Middle; puno.enabled = true; punoRenderer.enabled = true; StartCoroutine("StartCrush", TimeToCrush); anim.SetFloat("CrushDir", 0); middleHitSFX.Spawn(transform.position, transform.rotation); } }
// Use this for initialization void Start() { ChangueBGNormalReset(); firstRun = true; ManagerDoors.SubscribeOnVictory(ChangueOnVictory); ManagerTime.Instance.onTimeGameEnd += (ChangueOnLoose); ManagerPause.SubscribeOnPauseGame(onPaused); ManagerPause.SubscribeOnResumeGame(onResume); }
public override void DoBeforeLeaving() { bodyToForce.CanMove(true); anim.SetBool("isThrowing", false); anim.SetBool("Throw", false); ManagerPause.UnSubscribeOnPauseGame(OnPauseGame); ManagerPause.UnSubscribeOnResumeGame(OnResumeGame); Arrow.gameObject.SetActive(false); }
void OnEnable() { if (!firstRun) { ManagerPause.SubscribeOnPauseGame(OnPauseGame); ManagerPause.SubscribeOnResumeGame(OnResumeGame); } if (!proCamera2D.enabled) { proCamera2D.enabled = true; } }
protected override void Start() { if (SaveManager.Instance.comingFromTimeArcadeMode) { AIMove.gameObject.SetActive(false); gameObject.SetActive(false); return; } ManagerPause.SubscribeOnPauseGame(OnPauseGame); ManagerPause.SubscribeOnResumeGame(OnResumeGame); firstRun = false; }
void Start() { magicConstTime = 100.0f / ManagerTime.Instance.TimeOfGame; ManagerTime.Instance.onTimeGameEnd += StopAllSound; ManagerDoors.Instance.onVictory += StopAllSound; ManagerPause.SubscribeOnPauseGame(onPaused); ManagerPause.SubscribeOnResumeGame(onResume); ManagerTime.Instance.onStopTime += onPausedFreezee; ManagerTime.Instance.onPlayTime.Add(new Signal("onResumeFreeze", gameObject)); firstRun = false; }
void OnEnable() { if (!firstRun) { ManagerPause.SubscribeOnPauseGame(OnPauseGame); ManagerPause.SubscribeOnResumeGame(OnResumeGame); } renderer.material.color = fromColor; if (materialTwen == null) { materialTwen = renderer.DOColor(toColor, time).SetLoops(Loop, typeLoop); } materialTwen.Play(); }
protected virtual void Start() { if (SaveManager.Instance.comingFromTimeArcadeMode) { if (ActiveIfIsArcadeMode) { OnEnterAction(null); OnExitAction(null); } gameObject.SetActive(false); return; } ManagerPause.SubscribeOnPauseGame(OnPauseGame); ManagerPause.SubscribeOnResumeGame(OnResumeGame); firstRun = false; }
void Start() { if (effector.speed < 0) { InvertSprite(false); } ManagerPause.SubscribeOnPauseGame(OnPauseGame); ManagerPause.SubscribeOnResumeGame(OnResumeGame); firstRun = false; if (transform.parent != null) { CurrentPlatform platform = transform.parent.GetComponentInChildren <CurrentPlatform>(); if (platform != null) { platform.transform.position += Vector3.up * 0.26f; } } }