//public bool isTest = false;

    void Awake()
    {
        hideTween = GetComponent<TweenPosition>();
        hideAlpha = GetComponent<TweenAlpha>();

        hideTween.enabled = false;
    }
Пример #2
0
 private void Awake()
 {
     _instance = this;
     tween = this.GetComponent<TweenPosition>();
     audioButton = transform.Find("AudioButton").GetComponent<UIButton>();
     audioLabel = transform.Find("AudioLabel").GetComponent<UILabel>();
 }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     tweenOrthoSize = GetComponent<TweenOrthoSize>();
     tweenPosition = GetComponent<TweenPosition>();
     TouchUI = GameObject.Find("TouchUI");
     skeletonAnimation = GameObject.Find("title").GetComponent<SkeletonAnimation>();
 }
Пример #4
0
	public void Init(Bullet bullet){
		State = bullet;
		TweenPost = ActionTarget.AddComponent<TweenPosition> ();
		TweenPost.duration = bullet.DurationTime;
		TweenPost.from = bullet.StartPoint;
		TweenPost.to = bullet.TargetPoint;
		EventDelegate.Add( TweenPost.onFinished, DeleteSelf);

		if(bullet.StartSize != Vector3.one){
			TweenScal = ActionTarget.AddComponent<TweenScale> ();
			TweenScal.duration = bullet.DurationTime;
			TweenScal.from = bullet.StartSize;
			TweenScal.to = bullet.TargetSize;

			TweenScal.Play (true);
		}


		TweenRota = ActionTarget.AddComponent<TweenRotation>();
		TweenRota.to = new Vector3(0.0f, 0.0f, 360.0f);
		TweenRota.duration = bullet.DurationTime;
		TweenRota.style = UITweener.Style.Once;
		EventDelegate.Add(TweenRota.onFinished, _RotationCount);



		TweenPost.Play (true);
		TweenRota.Play (true);
		//Invoke ("DeleteSelf", bullet.DurationTime + 1.0f);
	}
Пример #5
0
 public void QuitAnimation(EventDelegate.Callback onComplete)
 {
     if (twPosition == null)
         twPosition = objAnimation.GetComponent<TweenPosition>();
     twPosition.PlayReverse();
     EventDelegate.Set(twPosition.onFinished, onComplete);
 }
Пример #6
0
	void Awake(){
		_instance = this;
		headSprite = transform.Find ("HeadSprite").GetComponent<UISprite> ();
		levelLabel = transform.Find ("LevelLabel").GetComponent<UILabel> ();
		nameLabel = transform.Find ("NameLabel").GetComponent<UILabel> ();
		diamondLabel = transform.Find ("DiamondLabel/DiamondNumLabel").GetComponent<UILabel> ();
		coinLabel = transform.Find ("CoinLabel/CoinNumLabel").GetComponent<UILabel> ();

		tween = this.GetComponent<TweenPosition> ();
		closeButton = transform.Find ("CancelButton").GetComponent<UIButton> ();

		changeNameButton = transform.Find ("ChangeNameButton").GetComponent<UIButton> ();
		changeNameGo = transform.Find ("ChangeNameBg").gameObject;
		nameInput = transform.Find ("ChangeNameBg/NameInput").GetComponent<UIInput> ();
		sureButton = transform.Find ("ChangeNameBg/SureButton").GetComponent<UIButton> ();
		cancelButton = transform.Find ("ChangeNameBg/CancelButton").GetComponent<UIButton> ();
		changeNameGo.SetActive (false);

		EventDelegate ed = new EventDelegate(this,"OnButtonCloseClick");
		closeButton.onClick.Add (ed);

		EventDelegate ed2 = new EventDelegate (this, "OnButtonChangeNameClick");
		changeNameButton.onClick.Add (ed2);

		EventDelegate ed3 = new EventDelegate (this, "OnButtonSureClick");
		sureButton.onClick.Add (ed3);

		EventDelegate ed4 = new EventDelegate (this, "OnButtonCancelClick");
		cancelButton.onClick.Add (ed4);


		PlayerInfo._instance.OnPlayerInfoChanged += this.OnPlayerInfoChanged;
	}
Пример #7
0
    // Use this for initialization
	void Awake () {

        _instance = this;
        tween = this.GetComponent<TweenPosition>();
        UIManager._instance.openCall += OnShowPanel;
        UIEventListener.Get(closebtn).onClick += OnClickClose;
	}
Пример #8
0
    void Awake()
    {
        if (myContainerDisplay == null)
        {
            myContainerDisplay = gameObject.GetComponentInChildren<ContainerDisplay>();
        }

        if (myContainerDisplay == null)
        {
            myContainerDisplay = gameObject.GetComponent<ContainerDisplay>();
        }

        startPos = this.transform.localPosition;
        UpdatePos();


        if (myContainerDisplay != null)
        {
            if (myContainerDisplay.IsWindowActive())
                this.transform.localPosition = inPos;
            else
                this.transform.localPosition = outPos;
        }

        if (tween == null)
        {
            tween = this.GetComponent<TweenPosition>();
            tween.enabled = false;
        }
    }
Пример #9
0
	// Use this for initialization
	void Awake() {
		_instance = this;
		tween = this.GetComponent<TweenPosition> ();
		NumDialog = this.transform.Find ("NumDilag").gameObject;

		inputxu=transform.Find("NumDilag/NumInput").GetComponent<UIInput>();
		NumDialog.SetActive (false);
	}
Пример #10
0
 private void Awake()
 {
     Instance = this;
     tween = this.GetComponent<TweenPosition>();
     coinScrollView = transform.Find("CoinScrollView").gameObject;
     diamondScrollView = transform.Find("DiamondScrollView").gameObject;
     diamondScrollView.SetActive(false);
 }
 protected void PlayTween(TweenPosition tween, Vector3 from, Vector3 to, float duration)
 {
     tween.ResetToBeginning();
     tween.from = from;
     tween.to = to;
     tween.PlayForward();
     tween.duration = duration;
 }
Пример #12
0
    void Awake()
    {
        _transform = transform;
        _tween = GetComponent<TweenPosition>();
        containerCount = 0;

        _transform.localPosition = Vector3.zero;
    }
Пример #13
0
 void Start()
 {
     TA = gameObject.GetComponent<TweenAlpha>();
     TP=gameObject.GetComponent<TweenPosition>();
     TP.from = transform.localPosition;
     a = 1 - 0.25f;
     b = transform.localPosition.y +110;
 }
	public void HeadToStartPosition(Vector3 startPosition)
	{
		tween = GetComponent<TweenPosition>();

		tween.from = transform.position;
		tween.to = startPosition;

		tween.PlayForward();
	}
Пример #15
0
    //public bool isTest = false;

    void Awake()
    {
        ShowTween = GetComponent<TweenPosition>();
        ShowAlpha = GetComponent<TweenAlpha>();

        ShowTween.enabled = false;
        ShowAlpha.enabled = false;

    }
Пример #16
0
	// Use this for initialization
	void Start () {
		tween = this.GetComponent<TweenPosition>();
		npcTalkLabel = transform.Find("Label").GetComponent<UILabel>();
		acceptButton = transform.Find("AcceptButton").GetComponent<UIButton>();

		EventDelegate ed1 = new EventDelegate(this, "OnAccept");
		acceptButton.onClick.Add(ed1);

	}
Пример #17
0
        protected override void Awake()
        {
            base.Awake();

            m_tweener = _GetComponent<TweenPosition>();
            m_tweener.onFinished.Clear();
            m_tweener.AddOnFinished(OnTweenFinish);
            
        }
Пример #18
0
	void Awake(){
		_instance = this;
		tween = this.GetComponent<TweenPosition> ();
		dialog = transform.Find ("TranscriptMapDialog").GetComponent<TranscriptMapDialog> ();
		closeButton = transform.Find ("BtnBack").GetComponent<UIButton> ();

		EventDelegate ed1 = new EventDelegate(this,"OnCloseButtonClick");
		closeButton.onClick.Add (ed1);
	}
Пример #19
0
    public override void CreateEffect()
    {
        if (bTweenPos)
        {
            float fromToValX = to.x - from.x;
            float fromToValY = to.y - from.y;

			Vector3 fromPos = new Vector3(transform.localPosition.x - fromToValX, transform.localPosition.y - fromToValY, transform.localPosition.z);
			Vector3 toPos = transform.localPosition;

            //创建需要的特效
            if (mTweenPos == null)
            {
				mTweenPos = TweenPosition.Begin(transform.gameObject, duration, toPos);
            }
            
			mTweenPos.from = fromPos;
			mTweenPos.to = toPos;
			mTweenPos.duration = duration;

            mTweenList.Add(mTweenPos);
        }

        if (bTweenScale)
        {
            //创建需要的特效
            if (mTweenScale == null)
            {
                mTweenScale = TweenScale.Begin(transform.gameObject, duration, endScale);
            }
            
            mTweenScale.value = startScale;
            mTweenScale.from = startScale;
			mTweenScale.to = endScale;
			mTweenScale.duration = duration;

            mTweenList.Add(mTweenScale);
        }

        if (bTweenAlpha)
        {
            if (GetComponent<UIPanel>() != null)            //若为 UIPanel, 添加AlphaTween到自己
            {
                AddEffectTo(gameObject);
            }
            else                                            // 否则,添加AlphaTween到所有自控件
            {
                List<UIWidget> list = new List<UIWidget>();
                UIToolkits.FindComponents<UIWidget>(transform, list);
                foreach (UIWidget widget in list)
                {
                    AddEffectTo(widget.gameObject);
                }
            }
        }
    }
Пример #20
0
	void Awake()
	{
		_instance = this;
		taskListGrid = transform.Find("Scroll View/Grid").GetComponent<UIGrid>();
		tween = this.GetComponent<TweenPosition>();
		closeButton = transform.Find("CloseButton").GetComponent<UIButton>();

		EventDelegate ed = new EventDelegate(this, "OnClose");
		closeButton.onClick.Add(ed);
	}
Пример #21
0
 void Awake()
 {
     _instance = this;
     messageLabel = transform.Find("MsgBg/Label").GetComponent<UILabel>();
     messagePanel = this.GetComponent<TweenAlpha>();
     msgTween = this.GetComponent<TweenPosition>();
     EventDelegate ed = new EventDelegate(this,"OnTweenFinished");
     messagePanel.onFinished.Add(ed);
     gameObject.SetActive(false);
 }
Пример #22
0
    void Awake()
    {
        m_myTransform = transform;

        Initialize();

        m_lblText = m_myTransform.GetComponentsInChildren<UILabel>(true)[0];
        m_tweenAlpha = m_myTransform.GetComponentsInChildren<TweenAlpha>(true)[0];
        m_tweenPosition = m_myTransform.GetComponentsInChildren<TweenPosition>(true)[0];
    }
Пример #23
0
    protected override void Awake()
    {
        headPositionTween = GetComponent<TweenPosition>() ?? Head.gameObject.AddComponent<TweenPosition>();
        headPositionTween.enabled = false;
        headDefaultPosition = Head.transform.localPosition;

        tailPositionTween = GetComponent<TweenPosition>() ?? Tail.gameObject.AddComponent<TweenPosition>();
        tailPositionTween.enabled = false;
        tailDefaultPosition = Tail.transform.localPosition;
    }
Пример #24
0
 void Start() {
     grid = transform.Find("coinlist/Grid").gameObject;
     btnclose = transform.Find("Btnclose").GetComponent<UIButton>();
     btnrefresh = transform.Find("Btnrefresh").GetComponent<UIButton>();
     timeLabel = transform.Find("TimeLabel").GetComponent<UILabel>();
     tween = transform.GetComponent<TweenPosition>();
     EventDelegate ed1 = new EventDelegate(this,"OnClose");
     btnclose.onClick.Add(ed1);
     GetShop();
 }
Пример #25
0
    // Use this for initialization
    void Start()
    {
        tween = this.GetComponent<TweenPosition>();
        UIEventListener.Get(closebtn).onClick += OnClickClose;
        UIEventListener.Get(okbtn).onClick += OnClickOkBuy;     

        gameObject.SetActive(false);
        UIManager._instance.openCall += OnShowPanel;
        buyPanel.SetActive(false);
        showWeaponList();
    }
Пример #26
0
    void Awake()
    {
        _instance = this;
       // deslbl = this.GetComponentInChildren<UILabel>();
        UIEventListener.Get(gameObject).onClick = OnClickClose;
        UIEventListener.Get(equipBtn).onClick = OnClickEquip;
        UIEventListener.Get(unequipBtn).onClick = OnClickUnEquip;

        tween = this.GetComponent<TweenPosition>();
        this.gameObject.SetActive(false);
    }
Пример #27
0
	void Start()
	{
		this.tweenPos  = this.gameObject.GetComponent<TweenPosition>();	
		this.tweenPos.ResetToBeginning();
	
		this.left_pos = new Vector3(-xOffset,0f,0f);
		this.right_pos = new Vector3(xOffset,0f,0f);
		
		//this.tweenPos.from = this.left_pos;
		//this.tweenPos.to = this.right_pos;
	}
Пример #28
0
 void Awake()
 {
     _instance = this;
     tween = this.gameObject.GetComponent<TweenPosition>();
     window = transform.Find("TranscriptWindow").GetComponent<TranscriptWindow>();
     BtnTranscriptUI[] transcripts = this.GetComponentsInChildren<BtnTranscriptUI>();
     foreach(var temp in transcripts)
     {
         transcriptDict.Add(temp.transcriptID, temp);
     }
 }
Пример #29
0
	// Use this for initialization
	void Start () 
	{
		tween = GetComponentInChildren<TweenPosition>();
		ItemShop.OnItemBought += VerifyAchievement;

		#if UNITY_WEBPLAYER
		packsLine.SetActive(false);
		goToUpgade.SetActive(false);
		goToPacks.SetActive(false);
		#endif
	}
Пример #30
0
    // Use this for initialization
    void Start()
    {
        fuelBarTween = fuelBar.GetComponent<TweenPosition>();
        speedDisplayTween = speedDisplay.GetComponent<TweenPosition>();
        healthTween = healthBar.GetComponent<TweenPosition>();

        currentSpeedLabel = speedDisplay.transform.Find("SpeedText").Find("Speed").GetComponent<UILabel>();

        NGUITools.SetActive(fuelBarTween.gameObject, false);
        NGUITools.SetActive(healthTween.gameObject, false);
    }
Пример #31
0
    public void ClosedUI()
    {
        TweenPosition tween = consumePanel.GetComponent <TweenPosition>();

        tween.PlayReverse();
    }
Пример #32
0
    public void OpenUI()
    {
        TweenPosition tween = consumePanel.GetComponent <TweenPosition>();

        tween.PlayForward();
    }
Пример #33
0
    private void Awake()
    {
        instance = this;

        GameGlobals.Instance.messageBoxPanel.SetActive(true);
        GameGlobals.Instance.tutorialPanel.SetActive(true);


        handIcon = GameObject.Find("sprHand");
        handIcon.SetActive(false);



        GameGlobals.Instance.achievements.scoresLock = true;

        tutorialTriggers = this.transform.Find("tutorialTriggers").gameObject;

        // Message
        messageBoardTween = GameObject.Find("MessageBoxPanel").GetComponent <TweenPosition>();
        messageBoardTween.ResetToBeginning();
        lblMessage = GameObject.Find("lblMessage").GetComponent <Text>();
        GameGlobals.Instance.messageBoxPanel.SetActive(false);

        // Anims


        handIconSwipeLRAnim                 = handIcon.AddComponent <TweenPosition>();
        handIconSwipeLRAnim.enabled         = false;
        handIconSwipeLRAnim.from            = new Vector3(120, 0, 0);
        handIconSwipeLRAnim.to              = new Vector3(-120, 0, 0);
        handIconSwipeLRAnim.duration        = 1.0f;
        handIconSwipeLRAnim.ignoreTimeScale = true;

        handIconRollAnim                 = handIcon.AddComponent <TweenPosition>();
        handIconRollAnim.enabled         = false;
        handIconRollAnim.from            = new Vector3(0, 120, 0);
        handIconRollAnim.to              = new Vector3(0, -120, 0);
        handIconRollAnim.duration        = 1.0f;
        handIconRollAnim.ignoreTimeScale = true;

        handIconJumpAnim                 = handIcon.AddComponent <TweenPosition>();
        handIconJumpAnim.enabled         = false;
        handIconJumpAnim.from            = new Vector3(0, 0, 0);
        handIconJumpAnim.to              = new Vector3(0, 90, 0);
        handIconJumpAnim.duration        = 1.0f;
        handIconJumpAnim.ignoreTimeScale = true;

        handIconTapAnim         = handIcon.AddComponent <TweenPosition>();
        handIconTapAnim.enabled = false;
        //handIconTapAnim.delay = 0.7f;
        handIconTapAnim.from            = new Vector3(0, 0, 0);
        handIconTapAnim.to              = new Vector3(0, -50, 0);
        handIconTapAnim.duration        = 0.3f;
        handIconTapAnim.ignoreTimeScale = true;

        if (tutorialTriggers != null)
        {
            foreach (Transform trigger in tutorialTriggers.transform)
            {
                TutorialTrigger onTriggerObject = trigger.GetComponent <TutorialTrigger>();
                if (onTriggerObject != null)
                {
                    onTriggerObject.OnEnter = (TutorialTrigger.OnEnterDelegate)Delegate.Combine(onTriggerObject.OnEnter, new TutorialTrigger.OnEnterDelegate(this.OnPlayerEnter));
                    onTriggerObject.OnExit  = (TutorialTrigger.OnExitDelegate)Delegate.Combine(onTriggerObject.OnExit, new TutorialTrigger.OnExitDelegate(this.OnPlayerExit));
                }
            }
        }
    }
Пример #34
0
 public unsafe static long $Invoke2(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(TweenPosition.Begin((GameObject)GCHandledObjects.GCHandleToObject(*args), *(float *)(args + 1), *(*(IntPtr *)(args + 2)), *(sbyte *)(args + 3) != 0)));
 }
Пример #35
0
 private void Awake()
 {
     _instance = this;
     twee      = this.transform.GetComponent <TweenPosition>();
 }
Пример #36
0
    void TweenMoveToEnd()
    {
        TweenPosition posTw = TweenPosition.Begin(DragTarget, 0.2f, GetEndLocalPos());

        posTw.callWhenFinished = "MoveEnd";
    }
Пример #37
0
    void InitSkillCard()
    {
        startBtn.gameObject.SetActive(false);
        cardContainer.gameObject.SetActive(true);

        for (int i = 0; i < cardContainer.transform.childCount; i++)
        {
            GameObject go = cardContainer.transform.GetChild(i).gameObject;

            if (i % 2 == 0)
            {
                go.transform.localPosition = new Vector3(-50, 35, 80);
                TweenPosition tp = go.GetComponent <TweenPosition>();
                tp.enabled = true;
                tp.from    = go.transform.localPosition;
                tp.onFinished.Clear();
                tp.delay    = i * 0.3f;
                tp.duration = 1.0f;
                tp.from     = go.transform.localPosition;
                tp.to       = new Vector3(5.5f, 12.3f + i * 0.1f, 80);
                tp.ResetToBeginning();

                TweenRotation tr = go.GetComponent <TweenRotation>();
                tr.enabled  = true;
                tr.delay    = i * 0.2f;
                tr.duration = 1.0f;
                tr.onFinished.Clear();
                tr.from = go.transform.rotation.eulerAngles;
                tr.to   = new Vector3(80, 0, 1.1722f);
                tr.ResetToBeginning();
            }
            if (i % 2 != 0)
            {
                go.transform.localPosition = new Vector3(50, 35, 80);
                TweenPosition tp = go.GetComponent <TweenPosition>();
                tp.enabled = true;
                tp.from    = go.transform.localPosition;
                tp.onFinished.Clear();
                tp.delay    = i * 0.3f;
                tp.duration = 1.0f;
                tp.from     = go.transform.localPosition;
                tp.to       = new Vector3(5.5f, 12.3f + i * 0.1f, 80);
                tp.ResetToBeginning();

                TweenRotation tr = go.GetComponent <TweenRotation>();
                tr.enabled  = true;
                tr.delay    = i * 0.2f;
                tr.duration = 1.0f;
                tr.onFinished.Clear();
                tr.from = go.transform.rotation.eulerAngles;
                tr.to   = new Vector3(80, 0, 1.1722f);
                tr.ResetToBeginning();
            }

            if (i >= cardContainer.transform.childCount - 1)
            {
                TweenPosition tp = go.GetComponent <TweenPosition>();
                tp.onFinished.Add(new EventDelegate(CardMoveToScreen));
            }
            else
            {
                TweenPosition tp = go.GetComponent <TweenPosition>();
                tp.onFinished.Add(new EventDelegate(PlayCardEffectMusic));
            }
        }
    }
Пример #38
0
        public void AppendHandCard(byte bViewId, byte[] cards, byte count)
        {
            if (cards == null || count == 0)
            {
                return;
            }
            //牌数据
            Buffer.BlockCopy(cards, 0, _cardata, _cardcount, count);
            _cardcount += count;

            //计算间距
            int nColSpace = CardColSpace;

            if (gameObject.activeSelf == false)
            {
                gameObject.SetActive(true);
            }

            //牌对象
            for (int i = _cardcount - count; i < _cardcount; i++)
            {
//				GameObject obj = (GameObject)Instantiate(Resources.Load(CardPrefabs));
                GameObject obj = Instantiate(CardPrefabs, Vector3.zero, Quaternion.Euler(new Vector3(0f, 0f, 0f))) as GameObject;
                obj.transform.parent = transform;
                float zValue = ((float)i) / 100 + 1;
                obj.transform.localScale = new Vector3(1, 1, zValue);

                int nRow = (int)(i / RowMaxCards);
                int nCol = (int)(i % RowMaxCards);

                Vector3 OldPos = Vector3.zero;

                switch (bViewId)
                {
                case 0: { OldPos = new Vector3(120, 250, 0); break; }

                case 1: { OldPos = new Vector3(-230, 100, 0); break; }

                case 2: { OldPos = new Vector3(-230, -100, 0); break; }

                case 3: { OldPos = new Vector3(300, -100, 0); break; }

                case 4: { OldPos = new Vector3(300, 100, 0); break; }
                }


                Vector3 NewPos = new Vector3(nColSpace * nCol, CardRowSpace * nRow * (-1), 0);
                obj.transform.localPosition = OldPos;
                TweenPosition.Begin(obj, 0.4f, NewPos);

                obj.name = "card_" + i.ToString();

//				//Card
//				UICard card = obj.GetComponent<UICard>();
//				card.shoot = new Vector3(0, ShootSpace, 0); ;
//				card.recvclick = Positively;
//				card.duration = Duration;
//				card.CardData = _cardata[i];
//				card.SetPos(NewPos);
//				card.SetShoot(false);
//				card.SetMask(false);
//				card.recvclick = false;
//
                //Sprite
                UISlicedSprite sp = obj.GetComponentInChildren <UISlicedSprite>();
                sp.depth = BaseDepth + i;

                if (DisplayItem)
                {
                    if (_cardata[i] == 254)
                    {
                        sp.spriteName = "card_giveup";
                    }
                    else
                    {
                        sp.spriteName = GetCardTex(_cardata[i]);
                    }
                }
                else
                {
                    if (_cardata[i] == 254)
                    {
                        sp.spriteName = "card_giveup";
                    }
                    else
                    {
                        sp.spriteName = "card_back";
                    }
                }

                //事件
//				UIButtonMessage msg = obj.GetComponent<UIButtonMessage>();
//				msg.functionName = ClickEvent;
//				msg.target = target;
                _cardlist.Add(obj);
            }


            if (Align == ccAlignType.CENTER)
            {
                float nXRate = transform.localScale.x;
                if (_cardcount > RowMaxCards)
                {
                    int nX = (-1) * (((int)((RowMaxCards - 1) * nColSpace * nXRate) + (int)CardSize.x) / 2 - ((int)CardSize.x / 2));
                    transform.localPosition = _oldPostion + new Vector3(nX, 0, 0);
                }
                else
                {
                    int nX = (-1) * (((int)((_cardcount - 1) * nColSpace * nXRate) + (int)CardSize.x) / 2 - ((int)CardSize.x / 2));
                    transform.localPosition = _oldPostion + new Vector3(nX, 0, 0);
                }
            }
            else if (Align == ccAlignType.LEFT)
            {
                int nX = (-1) * (int)(CardSize.x / 2);
                transform.localPosition = _oldPostion + new Vector3(nX, 0, 0);
            }
            else if (Align == ccAlignType.RIGHT)
            {
                float nXRate = transform.localScale.x;
                if (_cardcount > RowMaxCards)
                {
                    int nX = (-1) * (int)(((int)((RowMaxCards - 1) * nColSpace * nXRate) + CardSize.x) / 2 - (CardSize.x / 2));
                    transform.localPosition = _oldPostion + new Vector3(nX, 0, 0);
                }
                else
                {
                    int nX = (-1) * (int)(((int)((_cardcount - 1) * nColSpace * nXRate) + CardSize.x) / 2 - (CardSize.x / 2));
                    transform.localPosition = _oldPostion + new Vector3(nX, 0, 0);
                }
            }
        }
Пример #39
0
 private void SteelOpen()
 {
     TweenPosition.Begin(upSteel, moveDuration, upSteelMoveTo);
     TweenPosition.Begin(downSteel, moveDuration, downSteelMoveTo);
     GetComponent <AudioSource>().Play();
 }