本文整理汇总了C#中LTDescr类的典型用法代码示例。如果您正苦于以下问题:C# LTDescr类的具体用法?C# LTDescr怎么用?C# LTDescr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LTDescr类属于命名空间,在下文中一共展示了LTDescr类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
}
开发者ID:dafei2015,项目名称:hugula,代码行数:13,代码来源:Lua_LTDescr.cs
示例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;
}
}
开发者ID:BobLChen,项目名称:hugula,代码行数:13,代码来源:Lua_LTDescr.cs
示例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();
}
}
}
开发者ID:KittyMac,项目名称:LeanTween,代码行数:26,代码来源:LeanTween.cs
示例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) );
}
开发者ID:KittyMac,项目名称:LeanTween,代码行数:6,代码来源:LeanTween.cs
示例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);
}
开发者ID:KittyMac,项目名称:LeanTween,代码行数:6,代码来源:LeanTween.cs
示例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);
}
开发者ID:KittyMac,项目名称:LeanTween,代码行数:6,代码来源:LeanTween.cs
示例7: moveLocal
public static LTDescr moveLocal(GameObject gameObject, LTSpline to, float time)
{
d = options();
d.spline = to;
return pushNewTween(gameObject, new Vector3(1.0f, 0.0f, 0.0f), time, TweenAction.MOVE_SPLINE_LOCAL, d);
}
开发者ID:djfdat,项目名称:UnityTemplateProject-FolderStructure,代码行数:7,代码来源:LeanTween.cs
示例8: options
// LeanTween 2.0 Methods
public static LTDescr options(LTDescr seed)
{
Debug.LogError("error this function is no longer used"); return null;
}
开发者ID:KittyMac,项目名称:LeanTween,代码行数:5,代码来源:LeanTween.cs
示例9: moveLocal
/**
* Move a GameObject along a set of bezier curves, in local space
*
* @method LeanTween.moveLocal
* @param {GameObject} gameObject:GameObject Gameobject that you wish to move
* @param {Vector3[]} path:Vector3[] A set of points that define the curve(s) ex: Point1,Handle1,Handle2,Point2,...
* @param {float} time:float The time to complete the tween in
* @return {LTDescr} LTDescr an object that distinguishes the tween
* @example
* <i>Javascript:</i><br>
* LeanTween.move(gameObject, [Vector3(0,0,0),Vector3(1,0,0),Vector3(1,0,0),Vector3(1,0,1)], 2.0).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);<br><br>
* <i>C#:</i><br>
* LeanTween.move(gameObject, new Vector3[]{Vector3(0f,0f,0f),Vector3(1f,0f,0f),Vector3(1f,0f,0f),Vector3(1f,0f,1f)}).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);<br>
*/
public static LTDescr moveLocal(GameObject gameObject, Vector3[] to, float time)
{
descr = options();
if(descr.path==null)
descr.path = new LTBezierPath( to );
else
descr.path.setPoints( to );
return pushNewTween( gameObject, new Vector3(1.0f,0.0f,0.0f), time, TweenAction.MOVE_CURVED_LOCAL, descr );
}
开发者ID:KittyMac,项目名称:LeanTween,代码行数:24,代码来源:LeanTween.cs
示例10: moveSplineLocal
/**
* Move a GameObject through a set of points, in local space
*
* @method LeanTween.moveSplineLocal
* @param {GameObject} gameObject:GameObject Gameobject that you wish to move
* @param {Vector3[]} path:Vector3[] A set of points that define the curve(s) ex: ControlStart,Pt1,Pt2,Pt3,.. ..ControlEnd
* @param {float} time:float The time to complete the tween in
* @return {LTDescr} LTDescr an object that distinguishes the tween
* @example
* <i>Javascript:</i><br>
* LeanTween.moveSpline(gameObject, [Vector3(0,0,0),Vector3(1,0,0),Vector3(1,0,0),Vector3(1,0,1)], 2.0) .setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);<br><br>
* <i>C#:</i><br>
* LeanTween.moveSpline(gameObject, new Vector3[]{new Vector3(0f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,1f)}, 1.5f).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);<br>
*/
public static LTDescr moveSplineLocal(GameObject gameObject, Vector3[] to, float time)
{
descr = options();
descr.spline = new LTSpline( to );
return pushNewTween( gameObject, new Vector3(1.0f,0.0f,0.0f), time, TweenAction.MOVE_SPLINE_LOCAL, descr );
}
开发者ID:KittyMac,项目名称:LeanTween,代码行数:21,代码来源:LeanTween.cs
示例11: 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);
}
}
开发者ID:FGJ16-TeamDagon,项目名称:RitualOfDagon,代码行数:28,代码来源:GridController.cs
示例12: 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;
}
开发者ID:arthurfukushima,项目名称:2015_VikingVolley,代码行数:8,代码来源:UIHUD.cs
示例13: StartPower
public void StartPower()
{
m_fLastTweenColor = 1;
m_bIsPowerBarOn = true;
if(m_pValueToDescr != null)
m_pValueToDescr.cancel();
m_pValueToDescr = null;
}
开发者ID:arthurfukushima,项目名称:2015_VikingVolley,代码行数:8,代码来源:UIHUD.cs
示例14: EnemyMoveTo
public EnemyMoveTo()
{
OnFinish = null;
ActionObject = null;
isFixed = true;
EaseType = LeanTweenType.notUsed;
tweenDescriptor = null;
}
开发者ID:aeonphyxius,项目名称:unity_extensions,代码行数:8,代码来源:EnemyMoveTo.cs
示例15: 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;
}
开发者ID:aeonphyxius,项目名称:unity_extensions,代码行数:9,代码来源:EnemyRotateTo.cs
示例16: 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);
}
开发者ID:arthurfukushima,项目名称:2015_VikingVolley,代码行数:9,代码来源:UIHUD.cs
示例17: 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;
}
开发者ID:GisleSolv,项目名称:SEP,代码行数:9,代码来源:CameraSam.cs
示例18: 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);
}
开发者ID:dentedpixel,项目名称:LeanTween,代码行数:12,代码来源:TestingIssue.cs
示例19: 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);
}
开发者ID:dentedpixel,项目名称:LeanTween,代码行数:13,代码来源:TestingIssue2.cs
示例20: GamePlay_GamestateChanged
private void GamePlay_GamestateChanged()
{
if (GamePlay.Instance.State == GamePlay.GameplayState.Playing)
{
if (GamePlay.Instance.CurrentPlayer == GamePlay.Instance.DeepOnesPlayer)
{
ambientColor = Player.DeepOneColorLight;
}
else
{
ambientColor = Player.StrandedColorLight;
}
if (ambientColorTween != null) LeanTween.cancel(ambientColorTween.id);
ambientColorTween = LeanTween.value(gameObject, (v) => {
RenderSettings.ambientLight = Color.Lerp(RenderSettings.ambientLight, ambientColor, v);
}, 0, 1, Time.deltaTime * 3f);
}
else if (GamePlay.Instance.State == GamePlay.GameplayState.GameOver)
{
if (GamePlay.Instance.Winner == GamePlay.Instance.StrandedPlayer)
{
lightIntensity = 5;
lightRange = 40;
if (ambientColorTween != null) LeanTween.cancel(ambientColorTween.id);
ambientColorTween = LeanTween.value(gameObject, (v) => {
RenderSettings.ambientLight = Color.Lerp(RenderSettings.ambientLight, Color.white, v);
}, 0, 1, Time.deltaTime * 5f);
ambientIntensity = 1;
}
else
{
lightIntensity = 0.2f;
lightRange = 4.5f;
if (ambientColorTween != null) LeanTween.cancel(ambientColorTween.id);
ambientColorTween = LeanTween.value(gameObject, (v) => {
RenderSettings.ambientLight = Color.Lerp(RenderSettings.ambientLight, Color.red, v);
}, 0, 1, Time.deltaTime * 4f);
ambientIntensity = 0.2f;
}
}
}
开发者ID:FGJ16-TeamDagon,项目名称:RitualOfDagon,代码行数:47,代码来源:CameraLightController.cs
注:本文中的LTDescr类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论