clearProperties() public method

clears out all the TweenProperties
public clearProperties ( ) : GoTweenConfig,
return GoTweenConfig,
コード例 #1
0
    public static void Start(SampleClass[] cs, float[] to)
    {
        GoTweenConfig goConfig = new GoTweenConfig().setEaseType(GoEaseType.QuadInOut).setIterations(-1, GoLoopType.PingPong);

        for (int i = 0; i < cs.Length; ++i)
        {
            goConfig.clearProperties();
            goConfig.floatProp("floatVal", to[i]);
            Go.to(cs[i], 1, goConfig);
        }
    }
コード例 #2
0
    public static void Start(Transform[] ts, Vector3[] to)
    {
        GoTweenConfig goConfig = new GoTweenConfig().setEaseType(GoEaseType.QuadInOut).setIterations(-1, GoLoopType.PingPong);

        for (int i = 0; i < ts.Length; ++i)
        {
            goConfig.clearProperties();
            goConfig.addTweenProperty(new PositionTweenProperty(to[i]));
            Go.to(ts[i], 1, goConfig);
        }
    }
コード例 #3
0
 static public int clearProperties(IntPtr l)
 {
     try {
         GoTweenConfig self = (GoTweenConfig)checkSelf(l);
         var           ret  = self.clearProperties();
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #4
0
ファイル: Player.cs プロジェクト: nialltl/Muddledash
    void Unbop()
    {
        if (canControl) return;

        StartCoroutine(InvincibilityTimeout());

        canControl = true;

        // Tween cleanup, remove stun halo
        Go.killAllTweensWithTarget(stunHalo);
        haloUndoConfig.clearEvents();
        haloUndoConfig.onComplete(c => {
            stunHalo.gameObject.SetActive(false);
        });
        Go.to(stunHalo, 0.5f, haloUndoConfig);

        if (tired) {
            face.SetFace(Face.FaceType.Tired);
        } else {
            // return to default face if we're not in 'surprised' mode
            if (face.ActiveFace != Face.FaceType.Surprised) {
                var reaction = Random.Range(0f, 1f) < 0.5f ?
                    Face.FaceType.Default :
                    Face.FaceType.Frowning;

                face.SetFace(reaction);
            }
        }

        isInked = false;
        head.DisableInkSplat();

        bopTweenConfig.clearEvents();
        bopTweenConfig.clearProperties();
        bopTweenConfig.setEaseType(GoEaseType.ElasticOut);

        if (elasticRoutine != null) StopCoroutine(elasticRoutine);
        elasticRoutine = StartCoroutine(ElasticStandUp());

        // Jump up from bopped position
        if (surface == Surface.Ground) {
            cachedVelocity = rbody.velocity;
            cachedVelocity.y = jumpSpeed / 1.5f;
            rbody.velocity = cachedVelocity;
        }
    }
コード例 #5
0
    public void AnimatePositioningItem(Transform parentTo, System.Action <ItemPickup> endAnimationEvent, AudioType playSound = AudioType.None)
    {
        // Setup variables
        onAnimationEnd   = endAnimationEvent;
        transform.parent = parentTo;

        // Setup animation configuration
        itemAnimationConfiguration.clearEvents();
        itemAnimationConfiguration.clearProperties();

        // Setup scale and rotation
        itemAnimationConfiguration.localRotation(Quaternion.identity);
        itemAnimationConfiguration.scale(Vector3.one);

        // Setup path
        itemTweenPath[0] = transform.localPosition;
        itemTweenPath[1] = new Vector3((transform.localPosition.x / 2f), midTweenOffset, 0);
        itemAnimationConfiguration.localPositionPath(new GoSpline(itemTweenPath));

        // Check if we need to clean up the animation
        if (itemAnimation != null)
        {
            // Clean up this item animation from the animation queue
            Go.removeTween(itemAnimation);
            itemAnimation = null;
        }

        // Create and play a new animation
        itemAnimation = Go.to(transform, animationDuration, itemAnimationConfiguration);
        itemAnimation.setOnCompleteHandler(OnAnimationEnds);
        itemAnimation.play();

        // Play a sound effect
        if (playSound == AudioType.Place)
        {
            PlayClip(dropSound);
        }
        else if (playSound == AudioType.PickUp)
        {
            PlayClip(pickupSound);
        }
    }
コード例 #6
0
	public static void Start(SampleClass[] cs, float[] to)
	{
		GoTweenConfig goConfig = new GoTweenConfig().setEaseType(GoEaseType.QuadInOut).setIterations(-1, GoLoopType.PingPong);
		for (int i = 0; i < cs.Length; ++i) {
			goConfig.clearProperties();
			goConfig.floatProp("floatVal", to[i]);
			Go.to(cs[i], 1, goConfig);
		}
	}
コード例 #7
0
	public static void Start(Transform[] ts, Vector3[] to)
	{
		GoTweenConfig goConfig = new GoTweenConfig().setEaseType(GoEaseType.QuadInOut).setIterations(-1, GoLoopType.PingPong);
		for (int i = 0; i < ts.Length; ++i) {
			goConfig.clearProperties();
			goConfig.addTweenProperty(new PositionTweenProperty(to[i]));
			Go.to(ts[i], 1, goConfig);
		}
	}