Exemplo n.º 1
0
        public void Activation(ExplorerImpactType type, int impactId, ExplorerPositionData position)
        {
            if (type != ExplorerImpactType.StageInit)
            {
                _explorer.State.Position = position;
            }

            IImpact impact = null;

            switch (type)
            {
            case ExplorerImpactType.StageInit:
                impact = _explorer.GetStageImpact(impactId, true);
                break;

            case ExplorerImpactType.StageFinish:
                //impact = _explorer.GetStageImpact(impactId, false);
                break;

            case ExplorerImpactType.RoomsInit:
                impact = _explorer.GetRoomImpact(impactId);
                break;

            case ExplorerImpactType.PlayerLevels:
                impact = Player.GetImpact(impactId);
                break;

            default:
                throw new Exception($"Unknown activationType = {type}");
            }
            if (impact != null)
            {
                _impactLogic.ExecuteImpact(impact);
            }
        }
 public void Activation(ExplorerImpactType type, Int32 impactId, ExplorerPositionData position)
 {
     PreCommand();
     try
     {
         _modules.ActivationModule.Activation(type, impactId, position);
     }
     catch (Exception e)
     {
         Logger.ErrorEmulate(e);
         return;
     }
     PostCommand();
 }
 public void Activation(ExplorerImpactType type, Int32 impactId, ExplorerPositionData position)
 {
     PreCommand();
     try
     {
         _modules.ActivationModule.Activation(type, impactId, position);
     }
     catch (Exception e)
     {
         Logger.Exception(e, "Activation", new object[] { (object)(int)type, (object)impactId, (object)position });
         return;
     }
     PostCommand("Activation", new object[] { (object)(int)type, (object)impactId, (object)position });
 }