本文整理汇总了C#中LTDescr.setOrientToPath2d方法的典型用法代码示例。如果您正苦于以下问题:C# LTDescr.setOrientToPath2d方法的具体用法?C# LTDescr.setOrientToPath2d怎么用?C# LTDescr.setOrientToPath2d使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LTDescr
的用法示例。
在下文中一共展示了LTDescr.setOrientToPath2d方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: buildTween
private void buildTween(LeanTweenItem item, float delayAdd, bool generateCode){
float delay = item.delay + delayAdd;
bool code = generateCode;
float d = item.duration;
// Debug.Log("item:"+item.action);
if(item.action == TweenAction.ALPHA)
{
tween = code ? append("alpha", item.to.x, d) : LeanTween.alpha(gameObject, item.to.x, d);
}
else if(item.action == TweenAction.ALPHA_VERTEX)
{
tween = code ? append("alphaVertex", item.to.x, d) : LeanTween.alphaVertex(gameObject, item.to.x, d);
}
else if(item.action == TweenAction.MOVE)
{
tween = code ? append("move", item.to, d) : LeanTween.move(gameObject, item.to, d);
}
else if(item.action == TweenAction.MOVE_LOCAL)
{
tween = code ? append("moveLocal", item.to, d) : LeanTween.moveLocal(gameObject, item.to, d);
}
else if(item.action == TweenAction.MOVE_LOCAL_X)
{
tween = code ? append("moveLocalX", item.to.x, d) : LeanTween.moveLocalX(gameObject, item.to.x, d);
}
else if(item.action == TweenAction.MOVE_LOCAL_Y)
{
tween = code ? append("moveLocalY", item.to.x, d) : LeanTween.moveLocalY(gameObject, item.to.x, d);
}
else if(item.action == TweenAction.MOVE_LOCAL_Z)
{
tween = code ? append("moveLocalZ", item.to.x, d) : LeanTween.moveLocalZ(gameObject, item.to.x, d);
}
else if(item.action == TweenAction.MOVE_X)
{
tween = code ? append("moveX", item.to.x, d) : LeanTween.moveX(gameObject, item.to.x, d);
}
else if(item.action == TweenAction.MOVE_Y)
{
tween = code ? append("moveY", item.to.x, d) : LeanTween.moveY(gameObject, item.to.x, d);
}
else if(item.action == TweenAction.MOVE_Z)
{
tween = code ? append("moveZ", item.to.x, d) : LeanTween.moveZ(gameObject, item.to.x, d);
}
else if(item.action == TweenAction.MOVE_CURVED)
{
tween = code ? append("move", item.bezierPath ? item.bezierPath.vec3 : null, d) : LeanTween.move(gameObject, item.bezierPath.vec3, d);
if(item.orientToPath){
if(code){
codeBuild.Append(".setOrientToPath("+item.orientToPath.ToString().ToLower()+")");
}else{
tween.setOrientToPath(item.orientToPath);
}
}
if(item.isPath2d){
if(code){
codeBuild.Append(".setOrientToPath2d(true)");
}else{
tween.setOrientToPath2d(item.isPath2d);
}
}
}
else if(item.action == TweenAction.MOVE_CURVED_LOCAL)
{
tween = code ? append("moveLocal", item.bezierPath ? item.bezierPath.vec3 : null, d) : LeanTween.moveLocal(gameObject, item.bezierPath.vec3, d);
if(item.orientToPath){
if(code){
codeBuild.Append(".setOrientToPath("+item.orientToPath+")");
}else{
tween.setOrientToPath(item.orientToPath);
}
}
if(item.isPath2d){
if(code){
codeBuild.Append(".setOrientToPath2d(true)");
}else{
tween.setOrientToPath2d(item.isPath2d);
}
}
}
else if(item.action == TweenAction.MOVE_SPLINE)
{
tween = code ? append("moveSpline", item.splinePath ? item.splinePath.splineVector() : null, d) : LeanTween.moveSpline(gameObject, item.splinePath.splineVector(), d);
if(item.orientToPath){
if(code){
codeBuild.Append(".setOrientToPath("+item.orientToPath+")");
}else{
tween.setOrientToPath(item.orientToPath);
}
}
if(item.isPath2d){
if(code){
codeBuild.Append(".setOrientToPath2d(true)");
}else{
tween.setOrientToPath2d(item.isPath2d);
}
}
}
else if(item.action == TweenAction.ROTATE)
//.........这里部分代码省略.........