public void StartButton_OnClick() { Camera.main.orthographicSize = cameraSize; PlayerPrefs.SetInt(EPISODE_GAME_KEY, 0); PlatformController.BuildSecondPlatform(); StickController.SetSpeedGrowStick(0); StickController.SetSpeedRotationStick(0); StickController.CreateObjectStick(CharController.GetVectorChar()); }
public void RestartButton_OnClick() { PlayerPrefs.SetInt(EPISODE_GAME_KEY, 0); CharController.SetStartCharPosition(); StickController.DeleteObjectStick(); PlatformController.DeletePlatform(0); PlatformController.DeletePlatform(1); PlatformController.BuildSecondPlatform(); PlatformController.BuildFirstPlatform(); StickController.SetSpeedGrowStick(0); StickController.SetSpeedRotationStick(0); StickController.CreateObjectStick(CharController.GetVectorChar()); }
void Update() { if (PlayerPrefs.GetInt(EPISODE_GAME_KEY).Equals(0) || PlayerPrefs.GetInt(EPISODE_GAME_KEY).Equals(7)) { transform.position = VectorMoveHero; } if (!transform.position.Equals(VectorMoveHero)) { transform.position = Vector3.MoveTowards( transform.position, VectorMoveHero, Time.deltaTime * speedRotationStick); } else if (PlayerPrefs.GetInt(EPISODE_GAME_KEY).Equals(4)) { StickController.DeleteObjectStick(); StickController.CreateObjectStick(VectorMoveHero); PlatformController.ChangeColumns(); } }