private void Awake() //получене ссылок на компоненты { rigidbody = GetComponent <Rigidbody2D>(); animator = GetComponent <Animator>(); sprite = GetComponentInChildren <SpriteRenderer>(); controller = GetComponent <BlocksController>(); }
protected void Init() { Field.Width = 40; Field.Height = 30; Console.CursorVisible = false; _blockController = new BlocksController(); }
private void Start() { gameTime = new Stopwatch(); blocksController = FindObjectOfType <BlocksController>(); canvasAnimator = gameCanvas.GetComponent <Animator>(); gameState = GameState.Menu; music.volume = PlayerPrefs.GetFloat(GameConstants.MusicVolume, 1); PlayerPrefs.GetFloat(GameConstants.SFXVolume, 0.8f); }
private void Start() { gameController = FindObjectOfType <GameController>(); blocksController = FindObjectOfType <BlocksController>(); paddle = FindObjectOfType <Paddle>(); rigidBody = GetComponent <Rigidbody2D>(); spriteRenderer = GetComponent <SpriteRenderer>(); paddleToBallVector = transform.position - paddle.transform.position; boostCharge = 1f; additionalSpeed = -1; StartCoroutine(BoostRecharge()); StartCoroutine(MagnetRecharge()); }
public void Awake() { //crate singleton if (instance == null) { instance = this; } //set blockController from current object blocksController = this.gameObject.GetComponent <BlocksController>(); CheckValues(); //set word point screen corners SetScreenCornersToWord(); //set start saved material SetMaterialToBall(); }
private void Awake() { Instance = this; }
void Start() { bc = GameObject.Find ("Blocks").GetComponent<BlocksController>(); harvest = GameObject.Find ("Harvest").GetComponent<Harvest>(); guiOn = false; int width = 700, height = 80; savings = int.Parse(GameObject.FindGameObjectWithTag("Savings").GetComponent<Text>().text); windowRect = new Rect((Screen.width-width)/2,(Screen.height-height)/2,width,height); flag = -1; }
void Start() { counter = 1; bc = GameObject.Find ("Blocks").GetComponent<BlocksController>(); paused = false; fixedExpenditures=1000; Init (); livingExpenseText = new string[]{ "Living expenses stayed close to the average expenses this year.", "There was a high inflation rate this year, and living expenses increased by Rs. 1200.", "Due to ill health of a family member, you had to pay Rs. 2000 for treatment.", "Due to ill health of a family member, you had to pay Rs. 3000 for treatment."}; }
void Awake() { _gameOver = GetComponent <GameOver>(); _textControll = GetComponent <TextController>(); _blockControll = GetComponent <BlocksController>(); }