void SetMonitorPullParamsFreeMove() { doPlayerStateStuff = ClickSetTargetVector; doPlayerStateStuff += HandleVSliding; doPlayerStateStuff += HandleHRestedSliding; doPlayerStateStuff += MonitorXBoostStart; }
void SetPlayerStateParams() { Debug.Log("state switching to " + currentPlayerState); switch (currentPlayerState) { case playerStates.Resting: setRestingParams(); break; case playerStates.MonitorPull: setMonitorPullParams(); break; case playerStates.Grabbed: setGrabbedParams(); break; case playerStates.BoostOnEndDrag: setBoostOnEndDragParams(); break; case playerStates.InBoost: setInBoostParams(); break; case playerStates.BoostStarted: setBoostStartedParams(); break; default: setRestingParams(); break; } doStateStuff = doPlayerStateStuff; }
void SetRestingParamsLines() { gameVars.playerDefaultX = gameVars.PlayerRestingPosition; doPlayerStateStuff = HandleHRestedSliding; doPlayerStateStuff += HandleVSliding; doPlayerStateStuff += MonitorVerticalSwipe; }
void SetRestingParamsFreeMove() { gameVars.playerDefaultX = gameVars.PlayerRestingPosition; doPlayerStateStuff = HandleHRestedSliding; doPlayerStateStuff += ClickSetTargetVector; doPlayerStateStuff += HandleVSliding; }
public void Game() { doStateStuff = ScrollBackground; if (locomotion) { doStateStuff += SendResetMsg; } }
void SetInBoostParamsLines() { StartBoost(); doPlayerStateStuff = HandleVSliding; doPlayerStateStuff += HandleHBoostedSliding; doubleClickTimer = 0.0f; doPlayerStateStuff += TemporizeDoubleClick; }
void SetBoostStartedParamsLines() { doPlayerStateStuff = null; doPlayerStateStuff = HandleVSliding; doPlayerStateStuff += HandleHBoostedSliding; doubleClickTimer = 0.0f; doPlayerStateStuff += MonitorDoubleClick; }
void SetBoostOnEndDragParamsLines() { avatar.SetBool("Grabbed", true); doPlayerStateStuff = HandleHRestedSliding; SetCurrentCollisionState(playerCollisionStates.Invulnerable); Invoke("OnEndDrag", 0.5f); }
void SetRestingParamsJetpack() { gameVars.playerDefaultX = gameVars.PlayerRestingPosition; doPlayerStateStuff = HandleHRestedSliding; doPlayerStateStuff += Swim; doPlayerStateStuff += FallAcceleration; doPlayerStateStuff += HandleRotation; doPlayerStateStuff += MonitorJetpackClick; }
void SetBoostStartedParamsFreeMove() { doPlayerStateStuff = null; doPlayerStateStuff = ClickSetTargetVector; doPlayerStateStuff += HandleVSliding; doPlayerStateStuff += HandleHBoostedSliding; doubleClickTimer = 0.0f; doPlayerStateStuff += MonitorDoubleClick; }
void SetInBoostParamsFreeMove() { StartBoost(); doPlayerStateStuff = ClickSetTargetVector; doPlayerStateStuff += HandleVSliding; doPlayerStateStuff += HandleHBoostedSliding; doubleClickTimer = 0.0f; doPlayerStateStuff += TemporizeDoubleClick; }
public void Pushed(float pushToY) { if (pushToY < transform.position.y) { transform.localScale = new Vector3(transform.localScale.x, -1.0f, transform.localScale.z); } myAnim.SetTrigger("PushedUp"); pushToPositionY = pushToY; doObstacleStateStuff += VerticalTranslation; }
void SetWaiting() { doObstacleStateStuff = null; transform.position = new Vector3(startPosition.x, startPosition.y, startPosition.z); transform.localScale = baseScale; if (myRB2 != null) { myRB2.WakeUp(); } }
void SetApproaching() { doObstacleStateStuff = null; doObstacleStateStuff += LinearTranslation; doObstacleStateStuff += MonitorInGame; if (zTranslationScale) { doObstacleStateStuff += ZTranslation; } }
void VerticalTranslation() { //Debug.Log (gameObject.name + " Vertical T - push to : "+pushToPositionY + "diff : "+Mathf.Abs(transform.position.y - pushToPositionY)); if (Mathf.Abs(transform.position.y - pushToPositionY) > 0.1f) { transform.position = new Vector3(transform.position.x, Mathf.Lerp(transform.position.y, pushToPositionY, gsm.gameSpeed * pushForce * Time.deltaTime), transform.position.z); } else { doObstacleStateStuff -= VerticalTranslation; } }
void SetIngame() { doObstacleStateStuff = null; if (linearTranslation) { doObstacleStateStuff += LinearTranslation; } if (zTranslationScale) { doObstacleStateStuff += ZTranslation; } }
void TranslateFirstBlock() { if (firstBlock.transform.position.x > -80.0f) { firstBlock.transform.position = new Vector3(Mathf.Lerp(firstBlock.transform.position.x, firstBlock.transform.position.x - gameVars.linearTranslationOffset, speedManager.GameSpeed * Time.deltaTime), firstBlock.transform.position.y, firstBlock.transform.position.z); } else { firstBlock.SetActive(false); doStateStuff -= TranslateFirstBlock; } }
void InitBeginningBlock() { blocksControllers[0].CurrentBlockState = BlockController.blocksState.Approaching; nextBlock = blocksControllers [1]; if (blocksControllers.Count > 1) { for (int i = 2; i < blocksControllers.Count; i++) { blocksControllers [i].gameObject.SetActive(false); } } if (firstBlock != null) { doStateStuff += TranslateFirstBlock; } }
public void Intro() { if (activeSpriteList == null) { activeSpriteList = new BGScalesSpriteList(gameVars, null, null, null); } doStateStuff = ScrollBackground; if (locomotion) { doStateStuff += SendResetMsg; } ResetPosition = RestartPosition; }
public void Game() { doStateStuff = UpdateDistance; }
public void Pause() { doStateStuff = null; }
void SetMonitorPullParamsLines() { doPlayerStateStuff = HandleVSliding; doPlayerStateStuff += HandleHRestedSliding; doPlayerStateStuff += MonitorXBoostStart; }