本文整理汇总了C#中LTDescr类的典型用法代码示例。如果您正苦于以下问题:C# LTDescr类的具体用法?C# LTDescr怎么用?C# LTDescr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LTDescr类属于命名空间,在下文中一共展示了LTDescr类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: constructor
public static int constructor(IntPtr l)
{
try {
LTDescr o;
o=new LTDescr();
pushValue(l,true);
pushValue(l,o);
return 2;
}
catch(Exception e) {
return error(l,e);
}
}
示例2: constructor
public static int constructor(IntPtr l)
{
try {
LTDescr o;
o=new LTDescr();
pushValue(l,o);
return 1;
}
catch(Exception e) {
LuaDLL.luaL_error(l, e.ToString());
return 0;
}
}
示例3: init
/**
* This line is optional. Here you can specify the maximum number of tweens you will use (the default is 400). This must be called before any use of LeanTween is made for it to be effective.
*
* @method LeanTween.init
* @param {integer} maxSimultaneousTweens:int The maximum number of tweens you will use, make sure you don't go over this limit, otherwise the code will throw an error
* @example
* LeanTween.init( 800 );
*/
public static void init(int maxSimultaneousTweens)
{
if(tweens==null){
maxTweens = maxSimultaneousTweens;
tweens = new LTDescr[maxTweens];
_tweenEmpty = new GameObject();
_tweenEmpty.name = "~LeanTween";
_tweenEmpty.AddComponent(typeof(LeanTween));
_tweenEmpty.isStatic = true;
#if !UNITY_EDITOR
_tweenEmpty.hideFlags = HideFlags.HideAndDontSave;
#endif
DontDestroyOnLoad( _tweenEmpty );
for(int i = 0; i < maxTweens; i++){
tweens[i] = new LTDescr();
}
}
}
示例4: tweenOnCurveVector
private static Vector3 tweenOnCurveVector( LTDescr tweenDescr, float ratioPassed )
{
return new Vector3(tweenDescr.from.x + (tweenDescr.diff.x) * tweenDescr.animationCurve.Evaluate(ratioPassed),
tweenDescr.from.y + (tweenDescr.diff.y) * tweenDescr.animationCurve.Evaluate(ratioPassed),
tweenDescr.from.z + (tweenDescr.diff.z) * tweenDescr.animationCurve.Evaluate(ratioPassed) );
}
示例5: tweenOnCurve
// Tweening Functions - Thanks to Robert Penner and GFX47
private static float tweenOnCurve( LTDescr tweenDescr, float ratioPassed )
{
// Debug.Log("single ratio:"+ratioPassed+" tweenDescr.animationCurve.Evaluate(ratioPassed):"+tweenDescr.animationCurve.Evaluate(ratioPassed));
return tweenDescr.from.x + (tweenDescr.diff.x) * tweenDescr.animationCurve.Evaluate(ratioPassed);
}
示例6: tweenColor
private static Color tweenColor( LTDescr tween, float val )
{
Vector3 diff3 = tween.point - tween.axis;
float diffAlpha = tween.to.y - tween.from.y;
return new Color(tween.axis.x + diff3.x*val, tween.axis.y + diff3.y*val, tween.axis.z + diff3.z*val, tween.from.y + diffAlpha*val);
}
示例7: GamePlay_GamestateChanged
private void GamePlay_GamestateChanged()
{
if (GamePlay.Instance.State == GamePlay.GameplayState.Playing)
{
gridColorTweenStartColor = gridColor;
if (GamePlay.Instance.CurrentPlayer == GamePlay.Instance.DeepOnesPlayer)
{
gridTargetColor = Player.DeepOneColorDark;
}
else
{
gridTargetColor = Player.StrandedColorDark;
}
gridTargetColor.a = linesAlpha;
if (colorTween != null) LeanTween.cancel(colorTween.id);
colorTween = LeanTween.value(gameObject, (c) => {
gridColor = c;
for (int i = 0; i < lines.Count; i++)
{
lines[i].SetColors(gridColor, gridColor);
}
}, gridColorTweenStartColor, gridTargetColor, 1f);
}
}
示例8: FillPower
public void FillPower()
{
StopPower();
if (m_pValueToDescr != null)
m_pValueToDescr.cancel();
m_pValueToDescr = LeanTween.value(GameObject, SetPower, m_fPowerValue, m_slrPowerBar.maxValue, TweeningDefaultTime / m_slrPowerBar.maxValue * (m_slrPowerBar.maxValue - m_fPowerValue));
//m_pValueToDescr. onUpdateFloat = SetPower;
}
示例9: StartPower
public void StartPower()
{
m_fLastTweenColor = 1;
m_bIsPowerBarOn = true;
if(m_pValueToDescr != null)
m_pValueToDescr.cancel();
m_pValueToDescr = null;
}
示例10: EnemyMoveTo
public EnemyMoveTo()
{
OnFinish = null;
ActionObject = null;
isFixed = true;
EaseType = LeanTweenType.notUsed;
tweenDescriptor = null;
}
示例11: EnemyRotateTo
public EnemyRotateTo(RotateToData _data)
{
tweenDesc = null;
angle = _data.angle;
time = _data.time;
isAiming = _data.aim;
ease = (LeanTweenType)Enum.Parse(typeof(LeanTweenType), _data.ease);
direction = _data.direction;
}
示例12: SetScore
public void SetScore(int iScore)
{
m_txtScore.text = iScore.ToString();
if (m_pScorePunchDescr != null)
{
m_pScorePunchDescr.cancel();
}
m_pScorePunchDescr = LeanTween.moveLocalY(m_txtScore.gameObject, 7, 0.3f).setEase(LeanTweenType.punch);
}
示例13: FadeIn
public void FadeIn(float dur, LeanTweenType trans = LeanTweenType.easeInCubic, Action callback = null)
{
if (m_ease != null && LeanTween.isTweening(m_ease.uniqueId))
LeanTween.cancel(m_ease.uniqueId);
m_ease = LeanTween.value(gameObject, OnFade, m_blackScreenAlpha, 0, dur).setEase(trans);
m_ease.onComplete = callback;
}
示例14: Start
void Start()
{
LeanTween.init();
lt = LeanTween.move(gameObject,100*Vector3.one,2);
id = lt.id;
LeanTween.pause(id);
ff = LeanTween.move(gameObject,Vector3.zero,2);
fid = ff.id;
LeanTween.pause(fid);
}
示例15: Start
void Start()
{
descr = LeanTween.move(go, new Vector3(0f,0,100f), 10f);
descr.passed = 5f; // this should put it at the midway
descr.updateNow();
descr.pause(); // doesn't matter if pause after or before setting descr.passed I think if I set the passed property and paused the next frame it would work
// LeanTween.scale(go2, Vector3.one * 4f, 10f).setEasePunch();
LeanTween.scaleX (go2, (go2.transform.localScale * 1.5f).x, 15f).setEase (LeanTweenType.punch);
LeanTween.scaleY (go2, (go2.transform.localScale * 1.5f).y, 15f).setEase (LeanTweenType.punch);
LeanTween.scaleZ (go2, (go2.transform.localScale * 1.5f).z, 15f).setEase (LeanTweenType.punch);
}