当前位置: 首页>>代码示例>>C#>>正文


C# Transform.DOScale方法代码示例

本文整理汇总了C#中Transform.DOScale方法的典型用法代码示例。如果您正苦于以下问题:C# Transform.DOScale方法的具体用法?C# Transform.DOScale怎么用?C# Transform.DOScale使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Transform的用法示例。


在下文中一共展示了Transform.DOScale方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Attack

    // Instantie et modifie la taille du rayon
    IEnumerator Attack()
    {
        if(playerTooFar == false)
        {
            GetComponent<BossAttack>().rotationSpeed = 0.05f;
            fireRayTf = (Instantiate(fireRay, fireRaySpawn.position, transform.rotation) as GameObject).GetComponent<Transform>();
            fireRayTf.SetParent(transform);
            fireRayTf.DOScale(1, 0);
            fireRayTf.GetChild(0).DOScale(new Vector3(0.178734f, 1.87f, 0f), timeDuration).SetEase(ease);
            yield return new WaitForSeconds(fireRayDuration);
            StartCoroutine("DestroyAndCoolDown");
        }

        yield break;
    }
开发者ID:KeumarSIG,项目名称:DefieTaVie,代码行数:16,代码来源:FireRay.cs

示例2: Start

	void Start ()
	{
		// Caches
		spriteRenderer = GetComponent<SpriteRenderer>();
		myTransform = GetComponent<Transform>();

		// Set initial alpha
		Color color = spriteRenderer.material.color;
		spriteRenderer.material.color = new Color(color.r, color.g, color.b, 0.4f);

		float duration = Random.Range(0.8f, 1.6f);

		// Tween alpha
		spriteRenderer.material
			.DOFade(0.1f, duration)
			.SetEase(Ease.InOutSine)
			.SetLoops(-1, LoopType.Yoyo);

		// Tween scale
		myTransform.DOScale(new Vector3(0.75f, 0.5f, 1f), duration)
			.SetEase(Ease.InOutSine)
			.SetLoops(-1, LoopType.Yoyo);
	}
开发者ID:osmanzeki,项目名称:Necromaestro,代码行数:23,代码来源:AlphaGlow.cs

示例3: EmitDOTweenScaleFor

	void EmitDOTweenScaleFor(Transform t, Vector3 to, float twDuration, DG.Tweening.Ease ease)
	{
		t.localScale = Vector3.one;
		t.DOScale(to, twDuration).SetEase(ease).OnComplete(()=> EmitDOTweenScaleFor(t, to, twDuration, ease));
	}
开发者ID:Grogal,项目名称:dotween,代码行数:5,代码来源:TweenEnginesComparisonInternal.cs

示例4: GameObject

    /*private static Transform CreatSpriteRenderer(char num)
    {
        GameObject go = new GameObject();
        SpriteRenderer spriteRenderer = go.AddComponent<SpriteRenderer>();
        string path = "Assets/IconsPackage/UI_release/num/R0" + num + ".png";
        spriteRenderer.sprite = Resources.LoadAssetAtPath(path, typeof(Sprite)) as Sprite;
        go.name = "Num" + num;
        numWidth = spriteRenderer.bounds.size.x;
        //go.layer = LayerMask.NameToLayer("UI3D");
        return go.transform;

    }*/
    public static void MoveNumber(Transform target, float durationTime, float distance, float delayTime)
    {
        target.DOScale(Vector3.zero, 0);
        target.DOMoveY(distance, durationTime).SetRelative(true).OnComplete(() =>
        {
            GlobalData.Instance.Delay(delayTime, (o) => { DestoryTransform(o as Transform); }, target);
        });
        target.DOScale(new Vector3(2.2f, 2.2f, 2.2f), durationTime);
    }
开发者ID:zhaoyabo,项目名称:GameBase,代码行数:21,代码来源:UIArtNumber.cs

示例5: DOScale

 public static Tweener DOScale(Transform target, Vector3 endValue, float duration, int loops = -1, LoopType loopType = LoopType.Yoyo, float delay = 0, System.Action doComplete = null)
 {
     Tweener tweener = target.DOScale(endValue, duration);
     tweener.SetLoops(loops, loopType);
     SetTweenerComplete(tweener, delay, doComplete);
     return tweener;
 }
开发者ID:l980305284,项目名称:UGUIPlugin,代码行数:7,代码来源:DotweenUtlity.cs


注:本文中的Transform.DOScale方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。