Beispiel #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);
        }
Beispiel #2
0
        /* Functions */

        private void Awake()
        {
            this.mJCSTweener = this.GetComponent <JCS_TransformTweener>();
            this.mDisableWidthCertainRangeEvent = this.GetComponent <JCS_DisableWithCertainRangeEvent>();

            // set destination callback.
            mJCSTweener.SetCallback(DestinationCallback);
        }
Beispiel #3
0
        /* Setter & Getter */

        /* Functions */

        private void Awake()
        {
            this.mTransformTweener  = this.GetComponent <JCS_TransformTweener>();
            this.mAdjustTimeTrigger = this.GetComponent <JCS_AdjustTimeTrigger>();

            // set effect function pointer.
            this.mAdjustTimeTrigger.actions = TargetNewVectorValue;
        }
Beispiel #4
0
 protected virtual void Start()
 {
     if (mTweener == null)
     {
         mTweener = this.GetComponent <JCS_TransformTweener>();
     }
     if (mDestinationDestroy == null)
     {
         mDestinationDestroy = this.GetComponent <JCS_DestinationDestroy>();
     }
 }
        /* Functions */

        private void Awake()
        {
            this.mTransformTweener   = this.GetComponent <JCS_TransformTweener>();
            this.mAdjustTimerTrigger = this.GetComponent <JCS_AdjustTimeTrigger>();

#if UNITY_EDITOR
            if (mPoints.Count == 0)
            {
                JCS_Debug.LogWarning("Path action with 0 path point is not valid");
            }
#endif

            mAdjustTimerTrigger.actions = DoPath;
        }
Beispiel #6
0
        //----------------------
        // Protected Variables

        //========================================
        //      setter / getter
        //------------------------------

        //========================================
        //      Unity's function
        //------------------------------
        private void Awake()
        {
            this.mTweener = this.GetComponent <JCS_TransformTweener>();
        }
Beispiel #7
0
 //========================================
 //      Unity's function
 //------------------------------
 private void Awake()
 {
     mTransformTweener = this.GetComponent <JCS_TransformTweener>();
     mSoundPlayer      = this.GetComponent <JCS_SoundPlayer>();
 }