// Use this for initialization void Start() { _screenBorders = Camera.main.GetComponent <ScreenBorders>(); for (int i = 0; i < numOfWaitresses; i++) { GameObject wGo = new GameObject(INACTIVE_WAITRESS_NAME); wGo.AddComponent <SpriteRenderer>(); wGo.AddComponent <Rigidbody2D>().gravityScale = 0; wGo.AddComponent <CharacterDriver>().movementSpeed = 1; _waitresses.Add(wGo.AddComponent <Waitress>()); wGo.AddComponent <CircleCollider2D>(); wGo.transform.position = waitressPool; } _availableTables = new List <GameObject>(GameObject.FindGameObjectsWithTag(TABLE_TAG)); }
void Start() { LevelStateDictionary = new LevelOpenCloseDictionary(); LevelPriceDictionary = new LevelOpenPriceDictionary(); ColorStateDictionary = new СolorOpenCloseDictionary(); ColorPriceDictionary = new ColorOpenPriceDictionary(); ScreenBorders.CalculateScreenBorders(); try { LoadSaveFile(); } catch { LoadBlanckSaveFile(); } LoadMenuScene(); }
private void Start() { borders = ScreenBorders.Instance; }
void Start() { _screenBorders = Camera.main.GetComponent <ScreenBorders>(); _rb = GetComponent <Rigidbody2D>(); }
protected virtual void Start() { bound = gameObject.GetComponent <BoundsCheck>(); borders = ScreenBorders.Instance; }