// 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));
 }
Beispiel #2
0
    void Start()
    {
        LevelStateDictionary = new LevelOpenCloseDictionary();
        LevelPriceDictionary = new LevelOpenPriceDictionary();
        ColorStateDictionary = new СolorOpenCloseDictionary();
        ColorPriceDictionary = new ColorOpenPriceDictionary();

        ScreenBorders.CalculateScreenBorders();
        try
        {
            LoadSaveFile();
        }
        catch
        {
            LoadBlanckSaveFile();
        }
        LoadMenuScene();
    }
Beispiel #3
0
 private void Start()
 {
     borders = ScreenBorders.Instance;
 }
 void Start()
 {
     _screenBorders = Camera.main.GetComponent <ScreenBorders>();
     _rb            = GetComponent <Rigidbody2D>();
 }
Beispiel #5
0
 protected virtual void Start()
 {
     bound   = gameObject.GetComponent <BoundsCheck>();
     borders = ScreenBorders.Instance;
 }