public void CloseComplete() { //Called by the transition effect to tell us it's done transitioning to black. //now that the screen is dark, move characters to new position. // PlayManager.instance.party[0].transform.position = enterPos; //Change the current areaInfo to the new one. cam.GetComponent <CameraSystem>().currentArea = newArea; //recenter camera cam.GetComponent <CameraSystem>().ResetPos(); //recenter effect effect.ResetPos(); Debug.Log("Transition forced close!"); passTarget.SendMessage("Activate"); //Move the camera position. // //Tell AreaTransitionScript to fade back from black again. // effect.Continue(); // // //Change state to wait while it does that. state = transitionState.waiting; }
public void CloseComplete() { //Called by the transition effect to tell us it's done transitioning to black. //now that the screen is dark, move characters to new position. // PlayManager.instance.party[0].transform.position = enterPos; foreach (Player brosef in PlayManager.instance.party) { brosef.transform.position = enterPos; } //Move characters along side them. This is sloppy at present but whatever it's late if (PlayManager.instance.party.Length > 1) { Vector3 adjustPos = enterPos; if (bVertical) { adjustPos.x += 0.5f; } else { adjustPos.y -= 0.5f; } PlayManager.instance.party [1].transform.position = adjustPos; adjustPos = enterPos; if (PlayManager.instance.party.Length > 2) { if (bVertical) { adjustPos.x -= 0.5f; } else { adjustPos.y += 0.5f; } PlayManager.instance.party [2].transform.position = adjustPos; } } //Change the current areaInfo to the new one. cam.GetComponent <CameraSystem>().currentArea = newArea; //recenter camera cam.GetComponent <CameraSystem>().ResetPos(); //recenter effect effect.ResetPos(); //Move the camera position. //Tell AreaTransitionScript to fade back from black again. effect.Continue(); //Change state to wait while it does that. state = transitionState.transitionOpen; }
public void OpenComplete() { //Unlock character controls. // for (int i = 0; i < PlayManager.instance.party.Length; i++) { // PlayManager.instance.party [i].GetComponent<Movement> ().ForceLock (false); // } //Go back to waiting. state = transitionState.waiting; }
public override void autoUpdateState(Mouse mouse) { transitionState oldState = base.getSubState(); base.autoUpdateState(mouse); if (base.getSubState() == transitionState.DOWN && base.getSubState() != oldState) { startLevel(); } }
public void Activate() { //Change senders effect.UpdateSender(this.gameObject); //Tell AreaTransitionScript to fade back from black again. effect.Continue(); //Change state to wait while it does that. state = transitionState.transitionOpen; }
//Called by Player.cs when it touches the collider attached to this object. public void Begin() { state = transitionState.transitionClose; //lock character input // for (int i = 0; i < PlayManager.instance.party.Length; i++) { // PlayManager.instance.party [i].GetComponent<Movement> ().ForceLock (true); // } //Send notification to AreaTransitionEffect to begin the effect // effect.Begin(this); effect.SendMessage("Begin", this.gameObject); }
/** * Will AutoUpdate the State if this Button and is subPanels based on the psotion of the mouse * Note: Subpanels will be made invisible if the button is idle or inactive and when only be visible of the button is selected * Unless selectable == false; Then subPanels will be updated the same way they are in Panel * Otherwise * @param mouse */ public override void autoUpdateState(Mouse mouse) { //inactive Buttons do not update if (getState() != PanelState.INACTIVE) { if (mouse != null && isPointOver(mouse.getWorldPosition().X, mouse.getWorldPosition().Y)) { //MouseClick if (mouse.leftMouseDown || mouse.rightMouseDown || mouse.middleMouseDown) { subState = transitionState.DOWN; } //MouseOver else { //Alternate state? if (subState == transitionState.DOWN) { if (getState() == PanelState.IDLE && selectable) { setState(PanelState.SELECTED, true); } else { setState(PanelState.IDLE, true); } } subState = transitionState.MOUSEOVER; } } //Idle else { //Alternate State? if (subState == transitionState.DOWN) { if (getState() == PanelState.IDLE && selectable) { setState(PanelState.SELECTED, true); } else { setState(PanelState.IDLE, true); } } subState = transitionState.UP; } if (getState() == PanelState.SELECTED || !selectable) { autoUpdateSubPanels(mouse); } } updateImage(); }
public void OpenComplete() { //Unlock character controls. // for (int i = 0; i < PlayManager.instance.party.Length; i++) { // PlayManager.instance.party [i].GetComponent<Movement> ().ForceLock (false); // } //Go back to waiting. state = transitionState.waiting; passTarget.SendMessage("Activate"); effect.Reset(); //reset position to start position }
public void Reset() { state = transitionState.waiting; }
/** * Will set this buttons current SubState to the given state * @param newState */ public void setSubState(transitionState newState) { subState = newState; updateImage(); }