Ejemplo n.º 1
0
        /// <summary>
        /// Do the drop effect.
        /// </summary>
        /// <param name="other"></param>
        private void DropEffect(Collider other)
        {
            // Throw Action Effect...
            {
                //JCS_ThrowAction ta = this.gameObject.AddComponent<JCS_ThrowAction>();
                //ta.SetTargetTransform(other.transform);
                //ta.ActiveEffect();
            }

            // Tweener Effect...
            {
                if (mTweener == null)
                {
                    // default settings
                    mTweener = this.gameObject.AddComponent <JCS_TransformTweener>();

                    mTweener.EasingY           = JCS_TweenType.EASE_OUT_BACK;
                    mTweener.DurationX         = 2.0f;
                    mTweener.DurationY         = 5.0f;
                    mTweener.DurationZ         = 0;
                    mTweener.StopTweenDistance = 0.2f;
                }
                mTweener.DoTweenContinue(other.transform);
            }


            if (mDestinationDestroy == null)
            {
                // default settings
                mDestinationDestroy = this.gameObject.AddComponent <JCS_DestinationDestroy>();
                mDestinationDestroy.DestroyDistance = 0.5f;
            }
            mDestinationDestroy.SetTargetTransform(other.transform);
        }
Ejemplo n.º 2
0
 protected virtual void Start()
 {
     if (mTweener == null)
     {
         mTweener = this.GetComponent <JCS_TransformTweener>();
     }
     if (mDestinationDestroy == null)
     {
         mDestinationDestroy = this.GetComponent <JCS_DestinationDestroy>();
     }
 }