예제 #1
0
        private IEnumerator Animation(WarshipPowerPointsResourceModel resourceModel)
        {
            yield return(new WaitUntil(() => wppContext != null));

            int startValue = resourceModel.StartValue;
            int maxValue   = resourceModel.MaxValueForLevel;

            wppContext.ReplaceWarshipPowerPoints(startValue, maxValue);
            int amount = resourceModel.FinishValue - resourceModel.StartValue;

            string skinName = resourceModel.WarshipTypeEnum.ToString();

            StartCoroutine(WarshipAnimation(skinName, amount));
        }
예제 #2
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);
                }
            }
        }