Пример #1
0
    // Start is called before the first frame update
    void Init()
    {
        gameManager      = GameManager.Instance;
        bsName           = GetComponent <BSName>();
        bsName.roomValue = BSGridCell.TileEnum.ReceptionMerch;

        for (int i = 0; i < FoodDatabase.mapAlimentObject.Keys.Count; i++)
        {
            string alimentName         = FoodDatabase.mapAlimentObject.Keys.ToList()[i];
            int    randomAlimentAmount = Random.Range(2, 4);

            playerOrder.Add(alimentName, randomAlimentAmount);

            int randomNumber = Random.Range((-randomAlimentAmount + 1), randomAlimentAmount);

            int NewrandomAlimentAmount = randomAlimentAmount + randomNumber;

            DeliveryManOrder.Add(alimentName, NewrandomAlimentAmount);
        }

        ui.CustomStart(this);

        nameObject = GetComponent <Nominator>().customName;
        GameManager.Instance.PopUp.CreateText3D(nameObject, 15, posText3D.localPosition, transform);
    }
    // Start is called before the first frame update
    void Start()
    {
        particleSystem = GetComponent <ParticleSystem>();
        BSName bsName = GetComponentInParent <BSName>();

        if (!setManually && bsName != null)
        {
            var sh = particleSystem.shape;
            sh.position = new Vector3(bsName.size.x / 2f, 0, bsName.size.y / 2f);
            sh.scale    = new Vector3(1, bsName.size.y, 1);
            emitCount   = (int)((bsName.size.x * bsName.size.y) * 35f * 0.7f);
        }

        particleSystem.Emit(emitCount);
    }