void Start() { mMaxForce = ForceChangeStep * StepCount; mCurrentForceTarget = 0f; mUIAction = gameObject.GetComponent<SailforceUIAction>(); if( mUIAction == null ) mUIAction = gameObject.AddComponent<SailforceUIAction>(); mUIAction.mForeChangeCB = ForceChangeCallback; }
void Start() { mMaxForce = ForceChangeStep * StepCount; mCurrentForceTarget = 0f; mUIAction = gameObject.GetComponent <SailforceUIAction>(); if (mUIAction == null) { mUIAction = gameObject.AddComponent <SailforceUIAction>(); } mUIAction.mForeChangeCB = ForceChangeCallback; }