Ejemplo n.º 1
0
    public virtual void viewWillShow()
    {
        if (!this.gameObject.activeSelf)
        {
            RED.SetActive(true, this.gameObject);
        }
        state = VC_STATE.WILL_SHOW;
//		TweenPosition tp = gameObject.AddComponent<TweenPosition>();
//		tp.mComponentFlag = VCFlag;
//		tp.method = UITweener.Method.EaseIn;
//		tp.to = new Vector3(0,0,0);
//		tp.from = new Vector3(-1141f,0,0);
//		tp.duration =0.3f;
//		tp.PlayForward();
//		tp.onFinished.Clear();
//

        transform.localPosition = new Vector3(0, 0, 0);
        if (viewControllerBehaviour != null)
        {
            viewControllerBehaviour(VC_STATE.WILL_SHOW, this);
        }
//
//		tp.onFinished.Add(new EventDelegate(this,"viewDidShow"));
        StartCoroutine(IEviewDidShow());
    }
Ejemplo n.º 2
0
    public virtual void viewDidShow()
    {
        state = VC_STATE.DID_SHOW;
//		TweenPosition[] tp = this.GetComponents<TweenPosition>();
//		for(int i=0;i<tp.Length;i++)
//		{
//			if(tp[i].mComponentFlag==VCFlag)
//			{
//				Destroy(tp[i]);
//				break;
//			}
//		}

        if (viewControllerBehaviour != null)
        {
            viewControllerBehaviour(VC_STATE.DID_SHOW, this);
        }
    }
Ejemplo n.º 3
0
    public virtual void viewWillHidden()
    {
        if (!this.gameObject.activeInHierarchy)
        {
            return;
        }
        state = VC_STATE.WILL_HIDDEN;
//		TweenPosition tp = gameObject.AddComponent<TweenPosition>();
//		tp.mComponentFlag = VCFlag;
//		tp.method = UITweener.Method.EaseIn;
//		tp.from = new Vector3(0,0,0);;
//		tp.to = new Vector3(-1141f,0,0);
//		tp.duration =0.3f;
//		tp.PlayForward();
//		tp.onFinished.Clear();
//		tp.onFinished.Add(new EventDelegate(this,"viewDidHidden"));
        transform.localPosition = new Vector3(-1141f, 0, 0);
        if (viewControllerBehaviour != null)
        {
            viewControllerBehaviour(VC_STATE.WILL_HIDDEN, this);
        }
        StartCoroutine(IEviewDidHidden());
    }