예제 #1
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);
        }
    }
        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);
        }