private void CommonDrag() { if (Input.GetMouseButtonDown(0)) { if (!CurrentDrag) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit raycast; Physics.Raycast(ray, out raycast, 10f, GameManager.Instance.Layer_Cards | GameManager.Instance.Layer_Mechs | GameManager.Instance.Layer_Modules); if (raycast.collider != null) { ColliderReplace colliderReplace = raycast.collider.gameObject.GetComponent <ColliderReplace>(); if (colliderReplace) { CurrentDrag = colliderReplace.MyCallerCard.GetComponent <DragComponent>(); } else { CurrentDrag = raycast.collider.gameObject.GetComponent <DragComponent>(); } CurrentDrag.IsOnDrag = true; } } } if (Input.GetMouseButtonUp(0)) { ResetCurrentDrag(); } }
/// <summary> /// 检测是否有碰撞 /// </summary> /// <param name="CheckChild"></param> /// <returns></returns> public DragComponentSlot GetColliderBox(DragComponent CheckChild) { DragComponentSlot minDistanceChild = null; float minDistance = 1000; foreach (var child in DragChildList) { if (child.IsCheckMySelf) { float distance = Vector3.Distance(child.ComponentArea.position, CheckChild.ComponentArea.position); if (CheckChild != child && distance < minDistance) { minDistance = distance; minDistanceChild = child; } } } if (CheckIsCollision(CheckChild, minDistanceChild)) { return(minDistanceChild); } else { return(null); } }
/// <summary> /// 检测是否已经装备了的装备 /// </summary> /// <returns></returns> public bool CheckIsEquiptItem(DragComponent dragComponent) { bool flag = false; flag = HeroEquipContainerList.FirstOrDefault(P => P.MyItem == dragComponent) != null; flag = flag ? flag : heroEquipMedicineSlot.MyItem == dragComponent; return(flag); }
public void ResetCurrentDrag() { if (CurrentDrag) { CurrentDrag.IsOnDrag = false; CurrentDrag = null; } }
public void CancelCurrentDrag() { IsCanceling = true; if (CurrentDrag) { CurrentDrag.IsOnDrag = false; CurrentDrag = null; } }
/// <summary> /// 移除装备栏里的物品 /// </summary> public void RemoveItemFromSlot(DragComponent dragComponent) { var removeItemSlot = ContainerBoxList.FirstOrDefault(P => P.MyContainerBox == dragComponent as SingleContainerBox); if (removeItemSlot != null) { removeItemSlot.ClearUpItem(); //removeItemSlot.OnTouchSlot(); } }
public void MoveToHere(DragComponent enterComponent) { var itemData = enterComponent as SingleContainerBox; ItemFielInfo equiptItemInfo = itemData.itemFielInfo; ShowItem(equiptItemInfo); MyParent.EquiptItem(enterComponent); OnTouchSlot(); //NewbieGuideManager_V2.Instance.IsDragGuide(m_guideBtnID, itemData.GuideID); }
/// <summary> /// 装备物品 /// </summary> /// <param name="itemFielInfo"></param> public void EquiptItem(DragComponent dragComponent) { ContainerPackListManager.RemoveItemFromSlot(dragComponent); ItemFielInfo equipmentItem = (dragComponent as SingleContainerBox).itemFielInfo; SMsgContainerUse_CS dataStruct = new SMsgContainerUse_CS(); dataStruct.dwContainerID1 = dataStruct.dwContainerID2 = equipmentItem.sSyncContainerGoods_SC.SMsgContainerCSCHead.dwContainerID; dataStruct.byPlace = (byte)equipmentItem.sSyncContainerGoods_SC.nPlace; dataStruct.uidTarget = PlayerManager.Instance.FindHeroEntityModel().EntityDataStruct.SMsg_Header.uidEntity; dataStruct.byUseType = equipmentItem.LocalItemData._GoodsClass == 2 ? (byte)1 : (byte)0; NetServiceManager.Instance.ContainerService.SendContainerUse(dataStruct); }
/// <summary> /// 某个物件要放到这里了 /// </summary> /// <param name="enterComponent"></param> public override void MoveToHere(DragComponent enterComponent) { var itemData = enterComponent.gameObject.GetComponent <SkillsItem>(); //NewbieGuideManager_V2.Instance.IsDragGuide(m_guideBtnID, itemData.GetGuideID); m_isNewEquipSkill = true; CloneSkillItem(itemData.ItemFielInfo, enterComponent.gameObject); enterComponent.transform.localPosition = new Vector3(0, 0, -2); enterComponent.GetComponent <TweenPosition>().to = new Vector3(0, 0, -2); AssemblySucessEffect(); }
public void GetParentDragComponent(Transform child) { DragComponent dragComponent = child.GetComponent <DragComponent>(); if (dragComponent == null) { GetParentDragComponent(child.parent); } else { this.dragComponent = dragComponent; } }
public override void MoveToHere(DragComponent enterComponent) { var emptySlot = ContainerBoxList.FirstOrDefault(P => P.MyContainerBox == null && !P.IsLock); if (emptySlot != null) { emptySlot.MoveToHere(enterComponent); } else { var dragComponent = enterComponent as SingleContainerBox; SendUnloadEquipItemsToSever(dragComponent.itemFielInfo); } }
// Start is called before the first frame update private void Awake() { PV = GetComponent <PhotonView>(); wrenchComponent = GetComponent <WrenchComponent>(); dragComponent = GetComponent <DragComponent>(); followedGameObject = GameObject.FindWithTag("MainCamera"); if (PV.IsMine) { gameObject.tag = "Player"; // gameObject.layer = 8; transform.GetChild(0).gameObject.layer = 8; transform.GetChild(1).gameObject.layer = 8; } }
int IComparer.Compare(object x, object y) { DragComponent component = (DragComponent)x; DragComponent component2 = (DragComponent)y; if (component.zorderIndex > component2.zorderIndex) { return(-1); } if (component.zorderIndex < component2.zorderIndex) { return(1); } return(0); }
private void UpdateHandCardCountTicker() { if (Client.Instance.IsPlaying()) { if (!Input.GetMouseButton(0) && !Input.GetMouseButton(1)) { if (ClientPlayer == null) { return; } if (DragComponent.CheckAreas() == ClientPlayer.BattlePlayer.HandArea) { if (!handCardCountTickerBegin) { handCardCountTicker += Time.deltaTime; if (handCardCountTicker > (ClientPlayer == RoundManager.Instance.SelfClientPlayer ? handCardCountTimeThreshold : handCardCountTimeThreshold_Enemy)) { handCardCountTickerBegin = true; handCardCountTicker = 0; HandCardCountPanelAnim.SetTrigger("Jump"); HandCardCountText.text = string.Format(LanguageManager.Instance.GetText("HandManager_TotalCards"), cards.Count); if (ClientPlayer == RoundManager.Instance.EnemyClientPlayer) { foreach (CardBase cb in cards) { cb.ShowCardBackBloom(true); } } } } } else { handCardCountTicker = 0; handCardCountTickerBegin = false; HandCardCountPanelAnim.SetTrigger("Reset"); if (ClientPlayer == RoundManager.Instance.EnemyClientPlayer) { foreach (CardBase cb in cards) { cb.ShowCardBackBloom(false); } } } } } }
/// <summary> /// 移除某个拖拽的物件 /// </summary> /// <param name="dragComponent"></param> public void RemoveItem(DragComponent dragComponent) { SingleContainerBox DragItem = dragComponent as SingleContainerBox; HeroEquiptBoxSlot_V2 ClearSlot = HeroEquipContainerList.FirstOrDefault(P => P.MyItem == dragComponent); if (ClearSlot == null) { if (heroEquipMedicineSlot.MyItem == dragComponent) { heroEquipMedicineSlot.ClearUpItem(); } } if (ClearSlot != null) { ClearSlot.ClearUpItem(); } }
public override void OnBeginDrag(PointerEventData Data) { base.OnBeginDrag(Data); UI_Drag DragObject = DragComponent.GetComponent <UI_Drag>(); if (DragObject && Item != UI_Item.invalid) { DragObject.DragSize = Item.Size; } if (Remove == UI_InventorySlot.RemoveType.RemoveOnDrag && Inventory) { TempDrag = Item; Inventory.RemoveItem(gameObject); } }
//Operations: public override void OnBeginDrag(PointerEventData Data) { base.OnBeginDrag(Data); UI_Drag DragObject = DragComponent.GetComponent <UI_Drag>(); if (DragObject && Item != UI_Item.invalid) { DragObject.DragSize = Item.Size; } if (Inventory && Remove == RemoveType.RemoveOnDrag && RemoveEvent) { TempDrag = Item; ParentInventory.RemoveItem(Position); } }
public override void MoveToHere(DragComponent enterComponent) { ItemFielInfo equiptItemInfo = (enterComponent as SingleContainerBox).itemFielInfo; if (CheckIsEquiptItem(enterComponent)) { (enterComponent as SingleContainerBox).UpdatePos(); //MyParent.CloseContainerTips(); return; } if (equiptItemInfo.LocalItemData._GoodsClass == 2)//装备药品 { heroEquipMedicineSlot.MoveToHere(enterComponent); } else { HeroEquipContainerList.First(P => P.MyPositionID == ItemPlaceToIndex(int.Parse((equiptItemInfo.LocalItemData as EquipmentData)._vectEquipLoc))).MoveToHere(enterComponent); } }
/// <summary> /// 检测是否能够装备 /// </summary> /// <param name="dragChild"></param> /// <returns></returns> public override bool CheckIsPair(DragComponent dragChild) { bool flag = false; ItemFielInfo equiptItemInfo = (dragChild as SingleContainerBox).itemFielInfo; if (equiptItemInfo.LocalItemData._GoodsClass == 1 && ItemPlaceToIndex(int.Parse((equiptItemInfo.LocalItemData as EquipmentData)._vectEquipLoc)) != -1 && CheckCanEquipt(equiptItemInfo))//装备类 { flag = true; dragChild.NewSlotPoint = HeroEquipContainerList.First(P => P.MyPositionID == ItemPlaceToIndex(int.Parse((equiptItemInfo.LocalItemData as EquipmentData)._vectEquipLoc))).transform; } else if (equiptItemInfo.LocalItemData._GoodsClass == 2 && CheckCanEquipt(equiptItemInfo))//药品类 { dragChild.NewSlotPoint = heroEquipMedicineSlot.transform; flag = true; } return(flag); }
//public override void OnDragComponentHover() //{ // OnTouchSlot(); //} /// <summary> /// 检测是否能够拖拽进来 /// </summary> /// <param name="dragChild"></param> /// <returns></returns> //public override bool CheckIsPair(DragComponent dragChild) //{ // bool flag = false; // if (!MyContainerBoxSlotData.IsLock) // { // if (MyContainerBoxSlotData.itemfileInfo == null) // { // flag = true; // } // else if ((dragChild as SingleContainerBox).singleContainerBoxType == SingleContainerBoxType.Container) // { // flag = true; // } // } // return flag; //} /// <summary> /// 拖拽的物体移动到这里来 /// </summary> /// <param name="enterComponent"></param> public void MoveToHere(DragComponent enterComponent) { var itemData = enterComponent as SingleContainerBox; //NewbieGuideManager_V2.Instance.IsDragGuide(m_guideBtnID, itemData.GuideID); if (MyContainerBox == itemData) { TraceUtil.Log("相同物品"); //MyContainerBox.UpdatePos(); //myParent.MyParent.CloseContainerTips(); //TraceUtil.Log("MyContainerBox"); return; } else { TraceUtil.Log("新物品,MyPlace:" + MyContainerBoxSlotData.CurrentPlace); } SoundManager.Instance.PlaySoundEffect("Sound_Button_Equip"); myParent.OnDragComponentToSlot(this, itemData); }
/// <summary> /// 检测两个是否碰撞 /// </summary> /// <param name="childA"></param> /// <param name="childB"></param> /// <returns></returns> bool CheckIsCollision(DragComponent childA, DragComponentSlot childB) { Transform childAParent = childA.transform.parent; Transform childBParent = childB.transform.parent; childA.transform.parent = transform; childB.transform.parent = transform; Vector3 positionA = childA.ComponentArea.localPosition; Vector3 positionB = childB.ComponentArea.localPosition; BoxCollider boxColliderA = childA.ComponentArea.collider as BoxCollider; BoxCollider boxColliderB = childB.ComponentArea.collider as BoxCollider; //Vector3 scaleA = boxColliderA.size; //Vector3 scaleB = childB.ComponentArea.localScale; bool isXCollision = Mathf.Abs(positionA.x - positionB.x) < (boxColliderA.size.x / 2 + boxColliderB.size.x / 2); bool isYCollision = Mathf.Abs(positionA.y - positionB.y) < (boxColliderA.size.y / 2 + boxColliderB.size.y / 2); //TraceUtil.Log(string.Format("检测是否碰撞:{0}和{1},是否碰撞:{2}", childA.gameObject.name, childB.gameObject.name, isXCollision && isYCollision)); childA.transform.parent = childAParent; childB.transform.parent = childBParent; return(isXCollision && isYCollision); }
public override void Process(Entity entity) { // // This updates the Checker position (entity) that is being dragged by mouse // CurrentMouse = Mouse.GetState(); entity.Transform.Position = Scene.Camera.ScreenToWorldPoint(new Vector2(CurrentMouse.Position.X, CurrentMouse.Position.Y)); MainGameScene = entity.Scene as MainScene; //mouse entity belongs to MainScene gameBoad = MainGameScene.GameBoard; // // Get the from location of the white checker // DragComponent dc = entity.GetComponent <DragComponent>(); gameStack = dc.FromStack; boardLoc = gameStack.Tag; //white checker came from this location on the board MainGameScene.LegalMoves = gameBoad.GetWhiteLegalMoves(MainGameScene.DiceRoll, boardLoc); //StackComponent sc = gameStack.GetComponent<StackComponent>(); }
public override bool CheckIsPair(DragComponent dragChild) { bool flag = false; if ((dragChild as SingleContainerBox).singleContainerBoxType == SingleContainerBoxType.HeroEquip && ContainerInfomanager.Instance.GetEmptyPackBoxNumber() > 0) { flag = true; } if (flag) { var emptySlot = ContainerBoxList.FirstOrDefault(P => P.MyContainerBox == null && !P.IsLock); if (emptySlot != null) { dragChild.NewSlotPoint = emptySlot.transform; } else { dragChild.NewSlotPoint = PageNumberLabel.transform; } } //TraceUtil.Log("CheckCamMove:"+flag+","+dragChild.NewSlotPoint); return(flag); }
/// <summary> /// 检测被拖拽的物体能否移动到该槽位,判断条件由继承的子类自定 /// </summary> /// <param name="checkChild">拖拽的物体</param> /// <returns></returns> public virtual bool CheckIsPair(DragComponent dragChild) { return(true); }
public void SetCmps(Entity entity) { Particle = entity.GetComponent <ParticleComponent>(); Drag = entity.GetComponent <DragComponent>(); }
/// <summary> /// 检测被拖拽的物体能否移动到该槽位,判断条件由继承的子类自定 /// </summary> /// <param name="checkChild">拖拽的物体</param> /// <returns></returns> public override bool CheckIsPair(DragComponent dragChild) { //TraceUtil.Log("#############+CheckIsPair"); return(true); }
/// <summary> /// 某个物件要放到这里了 /// </summary> /// <param name="enterComponent"></param> public virtual void MoveToHere(DragComponent enterComponent) { }
public override void Process(Entity entity) { // // Mouse events are processed for White (human) player // hint: After white player clicks on "Dice Roll" then its his turn // MainGameScene = entity.Scene as MainScene; //hand entity belongs to MainScene if (MainGameScene.GameEnded) { MainGameScene.EndOfGame(); return; } if (!MainGameScene.WhiteCanMove) //Can white move? { return; } // // Mouse working area (find if it clicks on anything) // var _mouseCollider = entity.GetComponent <BoxCollider>(); CurrentMouse = Mouse.GetState(); // // Current location of the mouse // entity.Transform.Position = Scene.Camera.ScreenToWorldPoint(new Vector2(CurrentMouse.Position.X, CurrentMouse.Position.Y)); MousePos = new Vector2(CurrentMouse.Position.X, CurrentMouse.Position.Y); // // Check the mouse input action // if (Input.LeftMouseButtonPressed) { MainGameScene.Dragging = false; // // If mouse click is not colliding with anything (do nothing) // if (!_mouseCollider.CollidesWithAny(out CollisionResult collisionResult)) { return; } gameStack = collisionResult.Collider.Entity; if (MainGameScene.TestGraveYardForCheckers(24) > 0) //if true, then graveyard checkers go first { if (!MainGameScene.WhiteCanMoveFromGraveYard()) { MainGameScene.WhiteCanMove = false; return; } // // Test to see if White can move from graveyard, if not then set Whitecanmove to false // gameStack = MainGameScene.GameStacks[24]; //automatically, use checkers from White graveyard stack } // // Collided entity is a stack of checkers // Test it to be empty or black checkers (do nothing) // StackComponent sc = gameStack.GetComponent <StackComponent>(); if (sc == null) { return; //no stack of checkers } if (sc.CheckersInStack.Count == 0) { return; //empty stack of checkers } // // black checers tag are < 0 and white are > 0 // if (sc.CheckersInStack[0].Tag < 0) { return; //test first checker, if black checker leave } //znznznznznznznznznznznznznznznznznznznznznznznznznznznznznznznznznznznzn // Human player has grabbed a White checker //znznznznznznznznznznznznznznznznznznznznznznznznznznznznznznznznznznznzn MainGameScene.Dragging = true; Entity chkerDragEntity = sc.CheckersInStack[0]; //checker being dragged is saved sc.CheckersInStack.RemoveAt(0); //checker being dragges is Removed from original stack DragComponent dc = new DragComponent(); dc.FromStack = gameStack; //remember original stack chkerDragEntity.AddComponent <DragComponent>(dc); //add component so CheckerDragSystem can see it MainGameScene.CheckerBeingDragged = chkerDragEntity; //make sure we know, the checker being dragged } if (Input.LeftMouseButtonReleased) { // // Find the collider entity that checker is being dropped // if (!_mouseCollider.CollidesWithAny(out CollisionResult collisionResult)) { if (MainGameScene.Dragging) { MainGameScene.DropChecker2PreviousPosition(); } return; } // // We have dropped on top of a Stack // gameStack = collisionResult.Collider.Entity; if (MainGameScene.Dragging) { // // You can't drop White checkers on graveyard stacks //if (stack.Tag > 23) //{ // MainGameScene.DropChecker2PreviousPosition(); // MainGameScene.Dragging = false; // return; //} // // Drop location must either be Empty or have one or more White checkers, or be collector // StackComponent sc = gameStack.GetComponent <StackComponent>(); singleBlack = ((sc.CheckersInStack.Count() == 1) && (sc.CheckersInStack[0].Tag < 0)); //single black stackIsEmpty = (sc.CheckersInStack.Count == 0); if (stackIsEmpty) { stackIsWhite = true; } else { stackIsWhite = (sc.CheckersInStack[0].Tag > 0); } if (stackIsEmpty || stackIsWhite || singleBlack) { MainGameScene.DropChecker2NewPosition(gameStack); } else { MainGameScene.DropChecker2PreviousPosition(); } MainGameScene.Dragging = false; } } }
public static Entity GetCritter(Color color) { float radius = 10f; var critter = new Entity(); var pos = new Vector2(0, 0); var transform = new TransformComponent(critter) { LocalPosition = pos, LocalRotation = new Rotation(MathHelper.PiOver4), LocalDepth = 0.1f, Scale = new Vector2(1, 1) }; var graphics = new GraphicsComponent(critter) { TexturePath = TextureAtlas.CirclePath, Dimensions = new Point((int)(radius * 2), (int)(radius * 2)), Color = color }; var velocity = new VelocityComponent(critter) { RotationalVelocity = 0, Velocity = Vector2.Zero }; var circleCollider = new CircleColliderComponent(critter) { Radius = radius }; var rigidbody = new RigidBodyComponent(critter) { Mass = 0.05f, Restitution = 0.1f }; var drag = new DragComponent(critter) { MovementDragCoefficient = 0.1f, RotationDragCoefficient = 10f }; var movementControl = new MovementControlComponent(critter) { MaxMovementForceNewtons = 10.0f, MaxRotationForceNewtons = 10.0f, MovementMode = MovementMode.TwoWheels, }; var colour = new VisibleColourComponent(critter) { }; var energy = new EnergyComponent(critter) { Energy = 4f }; var reproduction = new ReproductionComponent(critter) { Efficency = 0.7f, ReproductionEnergyCost = 8f, Reproduce = 0, ReproductionThreshold = 0.5f, RequiredRemainingEnergy = 1f, ChildDefinitionId = "Soupling" }; var health = new HealthComponent(critter) { Health = 100, MaxHealth = 100, }; var age = new OldAgeComponent(critter) { MaxAge = 5 * 60 }; var brain = new BrainComponent(critter) { InputMap = new Dictionary <string, string> { { "eye1R", "eye1.EyeComponent.ActivationR" }, { "eye1G", "eye1.EyeComponent.ActivationG" }, { "eye1B", "eye1.EyeComponent.ActivationB" }, { "eye2R", "eye2.EyeComponent.ActivationR" }, { "eye2G", "eye2.EyeComponent.ActivationG" }, { "eye2B", "eye2.EyeComponent.ActivationB" }, { "eye3R", "eye3.EyeComponent.ActivationR" }, { "eye3G", "eye3.EyeComponent.ActivationG" }, { "eye3B", "eye3.EyeComponent.ActivationB" }, { "eye4R", "eye4.EyeComponent.ActivationR" }, { "eye4G", "eye4.EyeComponent.ActivationG" }, { "eye4B", "eye4.EyeComponent.ActivationB" }, { "mouth", "mouth.MouthComponent.Eating" }, { "nosecos", "nose.NoseComponent.CosActivation" }, { "nosesin", "nose.NoseComponent.SinActivation" }, { "health", "HealthComponent.HealthPercent" }, { "myRed", "VisibleColourComponent.RealR" }, { "myGreen", "VisibleColourComponent.RealG" }, { "myBlue", "VisibleColourComponent.RealB" }, { "Random", "Random" }, { "Bias", "Bias" }, }, //OutputMap = new Dictionary<string, string> // { // {"forwardback", "MovementControlComponent.WishForceForward" }, // {"rotation", "MovementControlComponent.WishRotForce" }, // {"reproduce", "ReproductionComponent.Reproduce" }, // {"red", "VisibleColourComponent.R" }, // {"green", "VisibleColourComponent.G" }, // {"blue", "VisibleColourComponent.B" }, // {"attack", "weapon.WeaponComponent.Activation" } // } OutputMap = new Dictionary <string, string> { { "wheelLeft", "MovementControlComponent.WishWheelLeftForce" }, { "wheelRight", "MovementControlComponent.WishWheelRightForce" }, { "reproduce", "ReproductionComponent.Reproduce" }, { "red", "VisibleColourComponent.R" }, { "green", "VisibleColourComponent.G" }, { "blue", "VisibleColourComponent.B" }, { "attack", "weapon.WeaponComponent.Activation" } } }; critter.AddComponents(transform, graphics, velocity, circleCollider, rigidbody, drag, movementControl, reproduction, colour, energy, health, age, brain); var eye1 = Eye.GetEye(Color.White, MathHelper.ToRadians(30)); eye1.Tag = "eye1"; critter.AddChild(eye1); var eye2 = Eye.GetEye(Color.White, MathHelper.ToRadians(-30)); eye2.Tag = "eye2"; critter.AddChild(eye2); var eye3 = Eye.GetEye(Color.White, MathHelper.ToRadians(90)); eye3.Tag = "eye3"; critter.AddChild(eye3); var eye4 = Eye.GetEye(Color.White, MathHelper.ToRadians(-90)); eye4.Tag = "eye4"; critter.AddChild(eye4); var mouth = Mouth.GetMouth(Color.White); critter.AddChild(mouth); mouth.GetComponent <TransformComponent>().LocalPosition = new Vector2(15, 0); var nose = Nose.GetNose(Color.White, 0, 10); nose.Tag = "nose"; critter.AddChild(nose); var weapon = Weapon.GetWeapon(Color.White); weapon.Tag = "weapon"; critter.AddChild(weapon); weapon.GetComponent <TransformComponent>().LocalPosition = new Vector2(30, 0); return(critter); }
public void handlePutRedirector ( DragComponent redirectorsDragComponent ) { if ( _currentRedirectorDragComponent == redirectorsDragComponent ) return; _currentRedirectorDragComponent = redirectorsDragComponent; GlobalVariables.MENU_FOR_REDIRECTOR = true; List < GameObject > setOfButtons = new List < GameObject > (); setOfButtons.Add ( UIControl.getInstance ().createButton ( "yesButton", -0.7f , GlobalVariables.HEIGHT_OF_UI_OBJECT + 9f, -1f, Vector3.one * ZoomAndLevelDrag.UI_SIZE_FACTOR, UIControl.getInstance ().textureYesUp, UIControl.getInstance ().textureYesDown, buildRedirectorCallBack, _currentRedirectorDragComponent.gameObject )); if ( ! GlobalVariables.TUTORIAL_MENU ) setOfButtons.Add ( UIControl.getInstance ().createButton ( "noButton", 0.7f, GlobalVariables.HEIGHT_OF_UI_OBJECT + 9f, -1f, Vector3.one * ZoomAndLevelDrag.UI_SIZE_FACTOR, UIControl.getInstance ().textureNoUp, UIControl.getInstance ().textureNoDown, revokeRedirectorCallBackWithoutAdding, _currentRedirectorDragComponent.gameObject )); foreach ( GameObject button in setOfButtons ) { button.GetComponent < ButtonManager > ().mySetOfButtons = setOfButtons; } }