Ejemplo n.º 1
0
 public override void Awake()
 {
     base.Awake();
     _shakeCamera = FindObjectOfType <CameraShake> ();
     _objectShake = GetComponent <ObjectShake> ();
     _theHouse    = FindObjectOfType <TheHouse> ();
     _theHellFire = FindObjectOfType <TheHellFire> ();
 }
Ejemplo n.º 2
0
 void Awake()
 {
     _shake = GetComponent <ObjectShake> ();
     _blastLight.localScale = Vector3.zero;
     _earthquake            = FindObjectOfType <Earthquake> ();
     _theHellFire           = FindObjectOfType <TheHellFire> ();
     _settings = FindObjectOfType <Settings> ();
     _endGame  = FindObjectOfType <EndGame> ();
 }
Ejemplo n.º 3
0
    public void ShakeStopBackGround(float decay, Action completed)
    {
        ObjectShake component = base.gameObject.GetComponent <ObjectShake>();

        if (null != component)
        {
            component.StopShake(decay, completed);
        }
    }
Ejemplo n.º 4
0
    public void SuspendShakeBackGround()
    {
        ObjectShake component = base.gameObject.GetComponent <ObjectShake>();

        if (null != component)
        {
            component.SuspendShake();
        }
    }
Ejemplo n.º 5
0
 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;
 }
Ejemplo n.º 6
0
    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);
        }
    }
Ejemplo n.º 7
0
    /// <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);
    }
Ejemplo n.º 8
0
        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);
        }
Ejemplo n.º 11
0
 public virtual void Awake()
 {
     settings          = FindObjectOfType <Settings> ();
     technologyManager = FindObjectOfType <TechnologyManager> ();
     _shake            = GetComponentInChildren <ObjectShake> ();
 }