public override void Awake() { base.Awake(); _shakeCamera = FindObjectOfType <CameraShake> (); _objectShake = GetComponent <ObjectShake> (); _theHouse = FindObjectOfType <TheHouse> (); _theHellFire = FindObjectOfType <TheHellFire> (); }
void Awake() { _shake = GetComponent <ObjectShake> (); _blastLight.localScale = Vector3.zero; _earthquake = FindObjectOfType <Earthquake> (); _theHellFire = FindObjectOfType <TheHellFire> (); _settings = FindObjectOfType <Settings> (); _endGame = FindObjectOfType <EndGame> (); }
public void ShakeStopBackGround(float decay, Action completed) { ObjectShake component = base.gameObject.GetComponent <ObjectShake>(); if (null != component) { component.StopShake(decay, completed); } }
public void SuspendShakeBackGround() { ObjectShake component = base.gameObject.GetComponent <ObjectShake>(); if (null != component) { component.SuspendShake(); } }
void Awake() { _originalDisplay = _display.sprite; _settings = FindObjectOfType <Settings> (); _shake = GetComponent <ObjectShake> (); _meshHits.ForEach(x => x.onHit += OnHit); _hp = GetComponent <HealthPoint> (); _skillController = GetComponent <TheDaystarSkillController> (); _currentAppearanceState = _appearances.Length; }
public void ShakeBackGround(float intensity, float decay, Action completed) { ObjectShake component = base.gameObject.GetComponent <ObjectShake>(); if (null != component) { component.ResetPosition(); component.StartShake(intensity, decay, completed); } }
/// <summary> /// 블럭이 공통적으로 가지고 있어야 될 값, 자식 객체들을 전달받음 /// </summary> public void Init_Common(int hp, ObjectShake shaker, TextMesh hpmesh, SpriteRenderer hite) { _HPMesh = hpmesh; _HPMesh.gameObject.SetActive(false); _HP = hp; _HPMesh.text = _HP.ToString(); _HitEffect = hite; _Shaker = shaker; _Shaker.Init(0.1f, 0.02f, 0.02f, 0.4f); }
private void Awake() { pc = GetComponent <PlayerController>(); grower = GetComponent <Grower>(); splitter = GetComponent <Splitter>(); shaker = GetComponent <ObjectShake>(); death = GetComponent <Death>(); AllSlimes.singleton.livingPlayers.Add(this);//registers player GameManager.instance.nPlayers += 1; }
private void OnFinishedShake() { ObjectShake component = ClassSingleton <AdventureSceneData> .Instance.scriptObjectRoot.GetComponent <ObjectShake>(); if (null != component) { component.ResetPosition(); if (this.isWaitFlag) { base.ResumeScriptEngine(); } UnityEngine.Object.Destroy(component); } }
public override bool RunScriptCommand() { bool result = false; ObjectShake objectShake = ClassSingleton <AdventureSceneData> .Instance.scriptObjectRoot.AddComponent <ObjectShake>(); if (null != objectShake) { objectShake.StartShake(this.intensity, this.decay, new Action(this.OnFinishedShake)); if (!this.isWaitFlag) { base.ResumeScriptEngine(); } result = true; } return(result); }
public virtual void Awake() { settings = FindObjectOfType <Settings> (); technologyManager = FindObjectOfType <TechnologyManager> (); _shake = GetComponentInChildren <ObjectShake> (); }