16
DOTween & DOTween Pro / Re: DOTween not working on Windows phone
« on: August 04, 2015, 07:14:18 PM »
Awesome , Many Thanks
Cheers
Daniel
Cheers
Daniel
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
void Update ()
{
breathCount = (int)touchCount.breathNumber;
textNum.text = breathCount.ToString ();
if (playedOnce == false) {
PlayTween ();
}
}
public void TransPortObject ()
{
//this.transform.position = new Vector3 (transform.position.x, transform.position.y, 100);
//
DOTween.RestartAll ();
print ("REst the tween has fired.. asif");
}
public void PlayTween ()
{
if (touchCount.state == touchCount.State.START) {
textNumber.DOMove (new Vector3 (transform.position.x, transform.position.y, 100), breathCount);
textNumber.GetComponent<MeshRenderer> ().material.color = new Color (1, 1, 1, 0);
s.Append (textNumber.GetComponent<Renderer> ().material.DOFade (1, touchCount.breathTime / 4));
s.Append (textNumber.GetComponent<Renderer> ().material.DOFade (0, touchCount.breathTime / 4 * 2).SetDelay (touchCount.breathTime / 4));
playedOnce = true;
}
}
using UnityEngine;
using System.Collections;
using DG.Tweening;
using UnityEngine.UI;
public class numberScript : MonoBehaviour
{
public Transform textNumber;
public bool playedOnce = false;
public Sequence s;
public TextMesh textNum;
private int breathCount;
void Start ()
{
s = DOTween.Sequence ();
textNumber.GetComponent<MeshRenderer> ().material.color = new Color (1, 1, 1, 0);
//textNumber.GetComponent<Renderer>().material.SetColor()
textNum = gameObject.GetComponent<TextMesh> ();
}
// Update is called once per frame
void Update ()
{
breathCount = (int)touchCount.breathNumber;
textNum.text = breathCount.ToString ();
if (playedOnce == false) {
PlayTween ();
}
}
public void TransPortObject ()
{
//this.transform.position = new Vector3 (transform.position.x, transform.position.y, 100);
//
DOTween.RestartAll ();
print ("REst the tween has fired.. asif");
}
public void PlayTween ()
{
if (touchCount.state == touchCount.State.START) {
textNumber.GetComponent<MeshRenderer> ().material.color = new Color (1, 1, 1, 0);
textNumber.DOMove (new Vector3 (transform.position.x, transform.position.y, 100),touchCount.breathTime);
s.Append (textNumber.GetComponent<Renderer> ().material.DOFade (1, touchCount.breathTime / 4));
s.Append (textNumber.GetComponent<Renderer> ().material.DOFade (0, touchCount.breathTime / 4 * 2).SetDelay (touchCount.breathTime / 4));
playedOnce = true;
}
}
}
void Update ()
{
PlayTween ();
}
void PlayTween ()
{
if (playedOnce == false) {
if (touchCount.state == touchCount.State.START) {
// Let's move the red cube TO 0,4,0 in 2 seconds
textNumber.DOMove (new Vector3 (transform.position.x, transform.position.y, -100), 6);
print ("played the fade tween");
textNumber.GetComponent<MeshRenderer> ().material.color = new Color (1, 1, 1, 0);
s.Append (textNumber.GetComponent<Renderer> ().material.DOFade (1, 1));
s.Append (textNumber.GetComponent<Renderer> ().material.DOFade (0, 2));
playedOnce = true;
}
}
}
public Transform textNumber;
bool playedOnce = false;
private Sequence s;
void Start ()
{
s = DOTween.Sequence ();
}
void Update ()
{
PlayTween ();
}
void PlayTween ()
{
if (playedOnce == false) {
if (touchCount.state == touchCount.State.START) {
print ("played the fade tween");
s.Append (textNumber.GetComponent<Renderer> ().material.DOFade (1, .5f));
s.Append (textNumber.GetComponent<Renderer> ().material.DOFade (1, 2));
playedOnce = true;
}
}
}
}