void Start() { fails = 0; hits = 0; totalApples = 0; temporalApples = 0; appleVelocity = 2f; manager = GetComponent <appleLevelManager>(); generator = GetComponent <AppleGenerator>(); }
void Start() { this.moichangController = GameObject.Find("minimoi").GetComponent <MoichangController>(); this.appleGenerator = GameObject.Find("AppleGenerator").GetComponent <AppleGenerator>(); this.appleCounter = GameObject.Find("AppleCounter"); this.SetCounterValues(); AudioSource[] audioSources = GetComponents <AudioSource>(); this.soundRingoUmaina = audioSources[0]; }
// Use this for initialization void Start() { //cesta = GameObject.FindGameObjectWithTag("cesta"); cestaAnim = cesta.GetComponent <Animator>(); isGotApple = false; levelManager = GetComponent <appleLevelManager>(); generator = GetComponent <AppleGenerator>(); goodSyllableText.text = "Busca\n" + levelManager.getGoodSyllable(); goodAppleIndicator.GetComponentInChildren <Text>().text = levelManager.getGoodSyllable(); }
//====== ctors public GameLogic(Size terrainSize, GameTime gameTime) : base(gameTime) { terrain = new Terrain(terrainSize); snakeBody = new SnakeBody(new Point(terrain.Size.Width / 2, terrain.Size.Height / 2)); speed = new SnakeSpeed(); applesGenerator = new AppleGenerator(terrain, gameTime); applesConsumer = new AppleConsumer(terrain, snakeBody, gameTime); terrainUpdater = new TerrainUpdater(terrain, snakeBody, gameTime); gameOverConditions = new GameOverConditions(snakeBody, terrain, applesGenerator, gameTime); score = new Score(); moveQueue = new SnakeMoveQueue(); updater = new GameObjectsUpdater(); SetupGameObjectsUpdater(); applesConsumer.Consumed += AppleConsumer_AppleConsumed; }
private bool isTimeOut = false; void Start() { this.moichangController = GameObject.Find("minimoi").GetComponent <MoichangController>(); this.appleCounter = GameObject.Find("AppleCounter"); this.timeCounter = GameObject.Find("TimeCounter"); this.appleGenerator = GameObject.Find("AppleGenerator").GetComponent <AppleGenerator>(); }