void Start() { gameManager = FindObjectOfType(typeof(GameManager)) as GameManager; soundManager = FindObjectOfType(typeof(SoundManager)) as SoundManager; flappy = FindObjectOfType(typeof(Flappy)) as Flappy; passed = false; }
void Start() { flappy = FlappyPlayer.GetComponent <Flappy>(); if (GameStateManager.GameState == GameState.Connecting) { switchToConnectingState(); } else if (GameStateManager.GameState == GameState.Intro) { if (GameStateManager.Instance.foundMatch) { customizeBird.ChangeFriendColor(GameStateManager.Instance.friendColor); spawner.SpawnPipes(GameStateManager.Instance.Pipes, GameStateManager.Instance.Pipes.Count); friendInMatch = true; friend.gameObject.SetActive(true); } TitlePanel.SetActive(false); PlayingPanel.SetActive(true); FlappyPlayer.SetActive(true); flappy.enabled = true; } else if (GameStateManager.GameState == GameState.Title) { TitlePanel.SetActive(true); PlayingPanel.SetActive(false); flappy.enabled = false; } }
public void OnPlayClick() { IntroGUI.SetActive(true); Score.SetActive(true); Flappy.SetActive(true); MenuGUI.SetActive(false); Canvas.SetActive(false); }
void Start() { PlayerPrefs.DeleteAll(); scenes = GameScenes.TITLE; flappy = FindObjectOfType(typeof(Flappy)) as Flappy; soundManager = FindObjectOfType(typeof(SoundManager)) as SoundManager; panel = FindObjectOfType(typeof(Panel)) as Panel; }
static void Main(string[] args) { using (Flappy game = new Flappy()) { #if !DEBUG game.IsFullScreen = true; #endif game.Run(); } }
// Use this for initialization void Start() { flappy = FindObjectOfType <Flappy>(); flappy.onDeath += StopParallax; for (int i = 0; i < pipes.Length; i++) { pipes[i].position = new Vector3(pipes[i].position.x, Random.Range(-0.1f, 0.30f), pipes[i].position.z); } }