Ejemplo n.º 1
0
        public void Execute()
        {
            DateTime now    = DateTime.UtcNow;
            var      awards = movingAwardsGroup.GetEntities();

            for (int index = 0; index < awards.Length; index++)
            {
                var      entity      = awards[index];
                DateTime arrivalTime = entity.movingIcon.iconTrajectory.controlPoints.Last().arrivalTime;
                if (arrivalTime <= now)
                {
                    // int increment = entity.movingIcon.increment;
                    Object.Destroy(entity.view.gameObject);
                    entity.Destroy();
                    uiSoundsManager.PlayWarshipPowerPointsAccrual();
                    //обновить значение шкалы
                    int oldValue = context.warshipPowerPoints.value;
                    context.ReplaceWarshipPowerPoints(oldValue + 1, context.warshipPowerPoints.maxValueForLevel);
                }
            }
        }