protected override void OnPress(bool isPressed) { if (isPressed) { Logger.Log("InventoriedDisplayedDevice::OnPress() " + getDebugInfos(), Logger.Level.INFO); if (_device == null) { Logger.Log("InventoriedDisplayedDevice::OnPress _device==null", Logger.Level.WARN); return; } DeviceContainer.AddingResult addingResult = _devicesDisplayer.askAddEquipedDevice(_device); Logger.Log("InventoriedDisplayedDevice::OnPress() added device result=" + addingResult + ", " + getDebugInfos(), Logger.Level.DEBUG); if (DeviceContainer.AddingResult.FAILURE_SAME_NAME == addingResult || DeviceContainer.AddingResult.FAILURE_SAME_DEVICE == addingResult) { if (_devicesDisplayer.askRemoveEquipedDevice(_device)) { RedMetricsManager.get().sendEvent(TrackingEvent.UNEQUIP, new CustomData(CustomDataTag.DEVICE, _device.getInternalName())); } } else { RedMetricsManager.get().sendEvent(TrackingEvent.EQUIP, new CustomData(CustomDataTag.DEVICE, _device.getInternalName())); } //pointer Animation if (gameObject.transform.FindChild("tutorialArrow(Clone)")) { ArrowAnimation.Delete("InventoryDevicesSlotsPanel"); GUITransitioner.get().arrowManager.isInventoryAnimPlaying = false; } } }
protected void CreateArrow(Transform t, Vector2 l, Vector2 r) { GameObject o = Instantiate(Resources.Load("Prefabs/UIPrefabs/Arrow_Object", typeof(GameObject)) as GameObject) as GameObject; o.name = "arrow_left"; o.transform.parent = t; o.transform.localPosition = new Vector3(0.0f, 0.0f, 2.5f); ArrowAnimation aa = o.GetComponent <ArrowAnimation> (); aa.Prepare(false, l); o = Instantiate(Resources.Load("Prefabs/UIPrefabs/Arrow_Object", typeof(GameObject)) as GameObject) as GameObject; o.name = "arrow_right"; o.transform.parent = t; o.transform.localPosition = new Vector3(0.0f, 0.0f, 2.5f); aa = o.GetComponent <ArrowAnimation> (); aa.Prepare(true, r); }
public void launchAnimation() { //screen 1 pointer if (isWorldScreenAnimPlaying && GUITransitioner.get().worldScreen.activeInHierarchy) { Inventory.get().animator.tutorialArrowAnimation.Play(GUITransitioner.GameScreen.screen1); isWorldScreenAnimPlaying = false; } //screen 2 pointer else if (Inventory.get().getDeviceAdded() && GUITransitioner.get()._currentScreen == GUITransitioner.GameScreen.screen2) { if (isInventoryAnimPlaying && Inventory.get().getDeviceAdded()) { ArrowAnimation.Delete("InventoryDevicesSlotsPanel"); isInventoryAnimPlaying = false; } Inventory.get().animator.tutorialArrowAnimation.Play(GUITransitioner.GameScreen.screen2); isInventoryAnimPlaying = true; } }
void Start() { isOver = true; Arrow = GameObject.Find("PointArrow").GetComponent <ArrowAnimation>(); ListCharacters = new List <Character>(); TurnRotation = new List <Turn>(); var numPlayers = (int)Random.Range(2, 5); var numEnemies = (int)Random.Range(4, 9); board = new Board(BoardSize, PlayerCount, EnemyCount); characterPerTeam = new int[2]; PrintBoard(); FillBoard(); TurnCreation(); aI = new AI(board, this); aI.ChangeTurn = TurnRotation[index]; camera = Camera.main.GetComponent <StartMovement>(); Reset(); isOver = false; camera.GetTarget(currentTurn.culprit.Object); camera.GameStart(); }
public void reset() { ArrowAnimation.Delete("WorldEquipButtonPanel"); sprite.transform.localScale = originalScale; isPlaying = false; }