public localPosition ( Vector3 endValue, bool isRelative = false ) : GoTweenConfig, | ||
endValue | Vector3 | |
isRelative | bool | |
return | GoTweenConfig, |
void Awake() { if (affectedTransform == null) { Debug.LogError("affectedTransform must be filled in."); } // Grab all platforms affectedPlatforms = affectedTransform.GetComponentsInChildren <SetupTextPlatform>(); // Setup animation configuration itemAnimationConfiguration.setIterations((loopForever ? -1 : 1), loopType); itemAnimationConfiguration.setEaseType(animationType); // Setup scale and rotation itemAnimationConfiguration.localRotation(Quaternion.identity); itemAnimationConfiguration.scale(Vector3.one); itemAnimationConfiguration.localPosition(Vector3.zero); // Disable all parenting scripts if (disableParentingAutomatically == true) { ParentToRotateEverything[] allParentScripts = affectedTransform.GetComponentsInChildren <ParentToRotateEverything>(); foreach (ParentToRotateEverything parentScript in allParentScripts) { parentScript.enabled = false; } } }
private void HideMainPanelPage() { bgColorConfig.setIterations(1); bgColorConfig.colorProp("color", Color.black); bgColorConfig.easeType = GoEaseType.ExpoOut; Image bgImg = bg.GetComponent <Image> (); Go.to(bgImg, 1f, bgColorConfig); for (int i = 0; i < btnsTrans.Count; i++) { GoTweenConfig config = new GoTweenConfig(); config.localPosition(new Vector3(800, 110 * (1 - i), 0), false); config.delay = 0.05f * i; config.setIterations(1); config.easeType = GoEaseType.ExpoOut; Go.to(btnsTrans [i].transform, 1f, config); } GoTweenConfig topBarConfig = new GoTweenConfig(); topBarConfig.setIterations(1); topBarConfig.localPosition(new Vector3(0, 250, 0)); topBarConfig.delay = 0.5f; topBarConfig.easeType = GoEaseType.ExpoOut; Go.to(GameObject.Find("TopBar").transform, 0.5f, topBarConfig); shipConfig = new GoTweenConfig(); shipConfig.localPosition(new Vector3(-1200, -40, -162)); shipConfig.easeType = GoEaseType.ExpoOut; Go.to(GameObject.Find("ShipModel").transform, 1f, shipConfig); }
private void MovePanel() { GoTweenConfig config = new GoTweenConfig (); config.easeType = GoEaseType.BackOut; config.setIterations (1); config.localPosition (Vector3.zero,false); Go.to (GameObject.Find ("ScorePanel").transform, 0.5f, config); }
private void HideTopBar() { GoTweenConfig topBarConfig = new GoTweenConfig(); topBarConfig.setIterations(1); topBarConfig.localPosition(new Vector3(0, 375, 0)); topBarConfig.easeType = GoEaseType.ExpoOut; Go.to(GameObject.Find("TopBar").transform, 0.5f, topBarConfig); }
private void MovePanel() { GoTweenConfig config = new GoTweenConfig(); config.easeType = GoEaseType.BackOut; config.setIterations(1); config.localPosition(Vector3.zero, false); Go.to(GameObject.Find("ScorePanel").transform, 0.5f, config); }
public void HideList() { CancelInvoke ("RotateShip"); _ship.SetActive(false); GoTweenConfig config = new GoTweenConfig (); config.setIterations (1); config.easeType = GoEaseType.ExpoOut; config.localPosition (new Vector3 (-590, -30, 0)); config.delay = 0.5f; Go.to (transform, 0.5f, config); }
public void HideList() { CancelInvoke("RotateShip"); _ship.SetActive(false); GoTweenConfig config = new GoTweenConfig(); config.setIterations(1); config.easeType = GoEaseType.ExpoOut; config.localPosition(new Vector3(-590, -30, 0)); config.delay = 0.5f; Go.to(transform, 0.5f, config); }
private void UpdateHpBar(bool isAdd) { GoTweenConfig config; config = new GoTweenConfig(); config.setIterations(1); config.easeType = GoEaseType.ExpoOut; float endX; if (isAdd) { if (HpBar.transform.localPosition.x < 0) { endX = HpBar.transform.localPosition.x + medicine; if (endX > 0) { endX = 0; } } else { endX = 0; } } else { if (HpBar.transform.localPosition.x > -STARTX) { endX = HpBar.transform.localPosition.x - damage; if (endX < -STARTX) { endX = -STARTX; } } else { endX = -STARTX; } } config.localPosition(new Vector3(endX, HpBar.transform.localPosition.y, HpBar.transform.localPosition.z)); Go.to(HpBar.transform, 0.3f, config); //player dead if (endX == -STARTX) { MyShip.SendMessage("DestroyPlayerShip"); } }
static public int localPosition(IntPtr l) { try { GoTweenConfig self = (GoTweenConfig)checkSelf(l); UnityEngine.Vector3 a1; checkType(l, 2, out a1); System.Boolean a2; checkType(l, 3, out a2); var ret = self.localPosition(a1, a2); pushValue(l, ret); return(1); } catch (Exception e) { return(error(l, e)); } }
// Use this for initialization void Start() { ProgressBar.transform.localPosition = new Vector3 (-500,0,0); GoTweenConfig config = new GoTweenConfig (); config.localPosition(new Vector3 (0, 0, 0)); config.delay = 1f; config.setIterations (1); config.onUpdate (delegate(AbstractGoTween obj) { onProgress(); }); config.onComplete (delegate { GlobalManager.GotoGamePanel(); }); Go.to (ProgressBar.transform, 4, config); }
// Use this for initialization void Start() { ProgressBar.transform.localPosition = new Vector3(-500, 0, 0); GoTweenConfig config = new GoTweenConfig(); config.localPosition(new Vector3(0, 0, 0)); config.delay = 1f; config.setIterations(1); config.onUpdate(delegate(AbstractGoTween obj) { onProgress(); }); config.onComplete(delegate { GlobalManager.GotoGamePanel(); }); Go.to(ProgressBar.transform, 4, config); }
public void ShowList() { _ship.transform.localPosition = new Vector3 (1500, 0, -120); _ship.SetActive(true); InvokeRepeating ("RotateShip", 0f, 0.002f); GoTweenConfig config = new GoTweenConfig (); config.setIterations (1); config.easeType = GoEaseType.ExpoOut; config.localPosition (new Vector3 (-390, -30, 0)); config.delay = 0.5f; Go.to (transform, 0.5f, config); config = new GoTweenConfig (); config.scale (new Vector3 (200, 200, 200)); config.localPosition (new Vector3 (50, 0, -120)); config.easeType = GoEaseType.ExpoOut; Go.to (_ship.transform, 1f, config); }
public void ShowList() { _ship.transform.localPosition = new Vector3(1500, 0, -120); _ship.SetActive(true); InvokeRepeating("RotateShip", 0f, 0.002f); GoTweenConfig config = new GoTweenConfig(); config.setIterations(1); config.easeType = GoEaseType.ExpoOut; config.localPosition(new Vector3(-390, -30, 0)); config.delay = 0.5f; Go.to(transform, 0.5f, config); config = new GoTweenConfig(); config.scale(new Vector3(200, 200, 200)); config.localPosition(new Vector3(50, 0, -120)); config.easeType = GoEaseType.ExpoOut; Go.to(_ship.transform, 1f, config); }
public void Show() { base.Show(); if (!isFirstShow) { isFirstShow = true; InvokeRepeating("RotateShip", 0, 0.02f); } Image bgImg = bg.GetComponent <Image> (); Go.to(bgImg, 2f, bgColorConfig); GlobalManager.shipColor = Ship.GetComponent <MeshRenderer>().material.color; shipConfig = new GoTweenConfig(); shipConfig.setIterations(1); shipConfig.easeType = GoEaseType.ExpoInOut; shipConfig.localPosition(new Vector3(-50, -30, -130)); shipConfig.scale(new Vector3(200, 200, 200)); Ship.transform.localScale = new Vector3(0, 0, 0); Go.to(Ship.transform, 1, shipConfig); for (int i = 0; i < btnsTrans.Count; i++) { GoTweenConfig config = new GoTweenConfig(); config.localPosition(new Vector3(350, 110 * (1 - i), 0), false); config.delay = 0.5f + 0.05f * i; config.setIterations(1); config.easeType = GoEaseType.ExpoOut; Go.to(btnsTrans[i].transform, 1f, config); string btnName = btnsTrans[i].name; btnsTrans[i].GetComponent <Button>().onClick.AddListener(delegate { onClickBtn(btnName); }); } }
private void UpdateHpBar(bool isAdd) { GoTweenConfig config; config = new GoTweenConfig(); config.setIterations(1); config.easeType = GoEaseType.ExpoOut; float endX; if (isAdd) { if(HpBar.transform.localPosition.x<0){ endX = HpBar.transform.localPosition.x+medicine; if(endX>0){ endX = 0; } }else{ endX = 0; } } else { if(HpBar.transform.localPosition.x>-STARTX){ endX = HpBar.transform.localPosition.x-damage; if(endX<-STARTX){ endX = -STARTX; } }else{ endX = -STARTX; } } config.localPosition(new Vector3(endX,HpBar.transform.localPosition.y,HpBar.transform.localPosition.z)); Go.to(HpBar.transform,0.3f,config); //player dead if (endX == -STARTX) { MyShip.SendMessage("DestroyPlayerShip"); } }
public void Show() { base.Show (); if (!isFirstShow) { isFirstShow = true; InvokeRepeating ("RotateShip", 0, 0.02f); } Image bgImg = bg.GetComponent<Image> (); Go.to (bgImg, 2f, bgColorConfig); GlobalManager.shipColor = Ship.GetComponent<MeshRenderer>().material.color; shipConfig = new GoTweenConfig (); shipConfig.setIterations (1); shipConfig.easeType = GoEaseType.ExpoInOut; shipConfig.localPosition(new Vector3(-50,-30,-130)); shipConfig.scale (new Vector3 (200, 200, 200)); Ship.transform.localScale = new Vector3 (0, 0, 0); Go.to (Ship.transform, 1, shipConfig); for (int i=0; i<btnsTrans.Count; i++) { GoTweenConfig config = new GoTweenConfig(); config.localPosition(new Vector3(350,110*(1-i),0),false); config.delay = 0.5f+0.05f*i; config.setIterations(1); config.easeType = GoEaseType.ExpoOut; Go.to (btnsTrans[i].transform, 1f , config); string btnName = btnsTrans[i].name; btnsTrans[i].GetComponent<Button>().onClick.AddListener(delegate { onClickBtn(btnName); }); } }
private void HideMainPanelPage() { bgColorConfig.setIterations(1); bgColorConfig.colorProp ("color", Color.black); bgColorConfig.easeType = GoEaseType.ExpoOut; Image bgImg = bg.GetComponent<Image> (); Go.to (bgImg, 1f, bgColorConfig); for (int i=0; i<btnsTrans.Count; i++) { GoTweenConfig config = new GoTweenConfig (); config.localPosition (new Vector3 (800, 110 * (1 - i), 0), false); config.delay = 0.05f * i; config.setIterations (1); config.easeType = GoEaseType.ExpoOut; Go.to (btnsTrans [i].transform, 1f, config); } GoTweenConfig topBarConfig = new GoTweenConfig (); topBarConfig.setIterations (1); topBarConfig.localPosition (new Vector3 (0,250,0)); topBarConfig.delay = 0.5f; topBarConfig.easeType = GoEaseType.ExpoOut; Go.to (GameObject.Find ("TopBar").transform, 0.5f, topBarConfig); shipConfig = new GoTweenConfig (); shipConfig.localPosition (new Vector3 (-1200, -40, -162)); shipConfig.easeType = GoEaseType.ExpoOut; Go.to (GameObject.Find ("ShipModel").transform, 1f, shipConfig); }
private void HideTopBar() { GoTweenConfig topBarConfig = new GoTweenConfig (); topBarConfig.setIterations (1); topBarConfig.localPosition (new Vector3 (0,375,0)); topBarConfig.easeType = GoEaseType.ExpoOut; Go.to (GameObject.Find ("TopBar").transform, 0.5f, topBarConfig); }