Example #1
0
        private static void MonoGameOnInitialize(object sender, EventArgs eventArgs)
        {
            Resources = new ResourcesManager();

            Platform.Initialize();

            Logger.Log("Rise", LoggerLevel.Info, "Initializing modules...");

            Controller = new Controller();
            Pointing   = new Pointing();
            Input      = new LegacyInputManager();

            Sound   = new SoundManager();
            Graphic = new GraphicManager(MonoGame.Graphics, MonoGame.GraphicsDevice);
            Scene   = new SceneManager();
            Ui      = new UiManager();
            Debug   = new DebugManager();

            _initializeAction?.Invoke();

            Scene.Initialize();
            Input.Initialize();

            Scene.Switch(_startScene);

            Config.Apply();

            Graphic.AllowUserResizing();
        }
Example #2
0
        /// <summary>
        /// Выполнить инициализацию панели
        /// </summary>
        /// <param name="_manager1">Управляющий графическим компонентом отображающим первую группу графиков</param>
        /// <param name="_manager2">Управляющий графическим компонентом отображающим вторую группу графиков</param>
        /// <param name="p1">Водяная емкость</param>
        /// <param name="p2">Доливная емкость</param>
        /// <param name="p3">Приемная емкость</param>
        /// <param name="p4">Блока очистки</param>
        /// <param name="p5">Промежуточная</param>
        /// <param name="p6">Емкость приготовления отсек1</param>
        /// <param name="p7">Емкость приготовления отсек2</param>
        /// <param name="p8">Приток/Потери бурового раствора</param>
        /// <param name="p9">Суммарные объем в емкостях</param>
        /// <param name="p10">Плотность приемная емкость</param>
        /// <param name="p11">Плотность блока очистки</param>
        /// <param name="p12">Плотность емкости приготовления отсек2</param>
        /// <param name="p13">Температура на выходе</param>
        /// <param name="p14">Температура на входе</param>
        /// <param name="p15">Ходы насоса 1</param>
        /// <param name="p16">Ходы насоса 2</param>
        /// <param name="p17">Поток на выходе</param>
        /// <param name="p18">Изменение потока на выходе</param>
        public void init(GraphicManager _manager1, GraphicManager _manager2, TextBox p1, TextBox p2, TextBox p3, TextBox p4, TextBox p5,
                         TextBox p6, TextBox p7, TextBox p8, TextBox p9, TextBox p10, TextBox p11, TextBox p12, TextBox p13,
                         TextBox p14, TextBox p15, TextBox p16, TextBox p17, TextBox p18)
        {
            if (Interlocked.Read(ref initialized) == 0)
            {
                manager1 = _manager1;
                manager2 = _manager2;

                _p1  = p1;
                _p2  = p2;
                _p3  = p3;
                _p4  = p4;
                _p5  = p5;
                _p6  = p6;
                _p7  = p7;
                _p8  = p8;
                _p9  = p9;
                _p10 = p10;
                _p11 = p11;
                _p12 = p12;
                _p13 = p13;
                _p14 = p14;
                _p15 = p15;
                _p16 = p16;
                _p17 = p17;
                _p18 = p18;

                InitializeFGraphicPanel();
                InitializeSGraphicPanel();

                Interlocked.Exchange(ref initialized, 1);
            }
        }
Example #3
0
 public DrawObj(Device dev, int name)
 {
     this.dev  = dev;
     ModelName = name;
     GraphicManager.GetManager().AddDrawObbject(this);
     InitTransform();
 }
Example #4
0
 public static void InitializeNoGraphic(PlatformBase platform)
 {
     Platform  = platform;
     NoGraphic = true;
     Graphic   = new GraphicManager(null, null);
     Resources = new ResourcesManager();
 }
Example #5
0
        /// <summary>
        /// Выполнить инициализацию панели
        /// </summary>
        /// <param name="_manager1">Графическая панель для первой группы графиков</param>
        /// <param name="_manager2">Графическая панель для второй группы графиков</param>
        /// <param name="talblok">Положение талевого блока</param>
        /// <param name="ves">Вес на крюке</param>
        /// <param name="glybina">Глубина инструмента</param>
        /// <param name="skorost">Скорость СПО</param>
        /// <param name="nadZaboem">Над забоем</param>
        /// <param name="gasNavihode">Газ на выходе</param>
        /// <param name="gasNaplosandke">Газ на площадке</param>
        /// <param name="gasPodrotorom">Газ под ротором</param>
        /// <param name="gasPriemna">Газ приемная емкость</param>
        /// <param name="gasVibrosit">Газ вибросит</param>
        public void init(GraphicManager _manager1, GraphicManager _manager2, Label _talblok, Label _ves,
                         Label _glybina, Label _skorost, Label _nadZaboem, Label _gasNavihode, Label _gasNaplosandke,
                         Label _gasPodrotorom, Label _gasPriemna, Label _gasVibrosit)
        {
            if (Interlocked.Read(ref initialized) == 0)
            {
                manager1 = _manager1;
                manager2 = _manager2;

                talblok = _talblok;
                ves     = _ves;

                glybina = _glybina;
                skorost = _skorost;

                nadZaboem   = _nadZaboem;
                gasNavihode = _gasNavihode;

                gasNaplosandke = _gasNaplosandke;
                gasPodrotorom  = _gasPodrotorom;

                gasPriemna  = _gasPriemna;
                gasVibrosit = _gasVibrosit;

                InitializeFGraphics();
                InitializeSGraphics();

                Interlocked.Exchange(ref initialized, 1);
            }
        }
Example #6
0
        /// <summary>
        /// 起動時の初期化
        /// </summary>
        /// <param name="rootDirResource">ルートディレクトリのリソース</param>
        void BootInit(string rootDirResource)
        {
            //カスタムコマンドの初期化
            BootInitCustomCommand();

            DataManager.BootInit(rootDirResource);
            //設定データを反映
            GraphicManager.BootInit(this, DataManager.SettingDataManager.LayerSetting);
            //パラメーターをデフォルト値でリセット
            Param.InitDefaultAll(DataManager.SettingDataManager.DefaultParam);
            //パラメーターを反映
            GraphicInfo.CallbackExpression                = Param.CalcExpressionBoolean;
            TextParser.CallbackCalcExpression            += Param.CalcExpressionNotSetParam;
            iTweenData.CallbackGetValue                  += Param.GetParameter;
            LanguageManagerBase.Instance.OnChangeLanugage = ChangeLanguage;

            //システムセーブデータの初期化&ロード
            SystemSaveData.Init(this);
            //通常セーブデータの初期化
            SaveManager.Init();

            //シナリオデータの初期化
            DataManager.BootInitScenariodData();

            //リソースファイル(画像やサウンド)のダウンロードをバックグラウンドで進めておく
            DataManager.StartBackGroundDownloadResource(StartScenarioLabel);
        }
Example #7
0
        //ゲームの開始、終了、ロード時などのクリア処理
        void ClearSub(bool isStopSound)
        {
            Page.Clear();
            SelectionManager.Clear();
            BacklogManager.Clear();
            GraphicManager.Clear();
            GraphicManager.gameObject.SetActive(true);
            if (UiManager != null)
            {
                UiManager.Close();
            }

            ClearCustomCommand();
            ScenarioPlayer.Clear();
            if (isStopSound && SoundManager != null)
            {
                SoundManager.StopBgm();
                SoundManager.StopAmbience();
            }

            if (MessageWindowManager == null)
            {
                Debug.LogError("MessageWindowManager is Missing");
            }
            SaveManager.GetSaveIoListCreateIfMissing(this).ForEach(x => ((IAdvSaveData)x).OnClear());
            SaveManager.CustomSaveDataIOList.ForEach(x => ((IAdvSaveData)x).OnClear());
            OnClear.Invoke(this);
        }
Example #8
0
        public void Start()
        {
            hasClosed        = false;
            gameLoop         = new DispatcherTimerGameLoop(1000 / 100);
            gameLoop.Update += Update;

            gameWindow         = new GameWindow(settings);
            gameWindow.Closed += (sender, args) => Stop();

            SocketFactory socketGame = new SocketFactory(settings);

            socketGame.Cancel += Stop;
            socketManager      = socketGame.CreateSocketManager();

            GraphicManager graphicManager = new GraphicManager(gameWindow.Canvas);
            InputFactory   inputFactory   = new InputFactory(gameWindow.Canvas, socketManager);

            if (hasClosed)
            {
                return;
            }

            world = new World(settings, inputFactory, graphicManager);
            CompositionTarget.Rendering += (sender, args) => world.Draw();
            world.Start();
            gameWindow.Show();
            gameLoop.Start();
        }
        public static void SetNullSelectionManager(this GraphicManager manager)
        {
            DefaultSelectionManager oldManager = manager.SelectionManager as DefaultSelectionManager;
            NullSelectionManager    newManager = new NullSelectionManager(manager.FLGView, manager);

            manager.SetSelectionManager(newManager);
        }
        public static void SetNullInteractor(this GraphicManager manager)
        {
            DefaultUserInteractor oldInteractor = manager.UserInteractor;
            NullUserInteractor    newInteractor = new NullUserInteractor(oldInteractor);

            manager.SetUserInteractor(newInteractor);
        }
Example #11
0
        private ParametersViewPanel panelView;              // отображаемая панель

        public KRSForm(DateTime _now)
        {
            InitializeComponent();

            _app = Application.CreateInstance();

            manager           = graphicsSheet1.InstanceManager();
            manager.StartTime = _app.Commutator.MinTimeParameter();

/*
 *          if (manager.StartTime == DateTime.MinValue)
 *          {
 *              manager.StartTime = DateTime.Now;
 *          }
 */
            manager.OnDataNeed += new EventHandler(manager_OnDataNeed);
            manager.Orientation = GraphicComponent.Orientation.Horizontal;

            graphics = new Graphic[5];
            for (int index = 0; index < graphics.Length; index++)
            {
                graphics[index] = manager.InstanceGraphic();

                graphics[index].Range.Min = 0;
                graphics[index].Range.Max = 65535;
            }

            manager.UpdatePeriod = 500;
            numericUpDown1.Value = 500;
        }
Example #12
0
        /// <summary>
        /// Start버튼 눌렀으때
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void StartBtn_Click(object sender, EventArgs e)
        {
            GraphicManager.GetManager().ListInit();
            string Start = StartTxtInput.Text;
            Spot   StartSpot;

            if (Start == null || Start == "")
            {
                StartSpot = new Spot(0, 0);
            }
            else
            {
                StartSpot = new Spot(Start);
            }
            GraphicManager.GetManager().RobotPostInit(new Microsoft.DirectX.Vector3(StartSpot.x, 0, StartSpot.y));
            LogicWraper.init((int)StartSpot.y, (int)StartSpot.x, (int)MapSize.x, (int)MapSize.y);

            foreach (Spot s in HazardList)
            {
                GraphicManager.GetManager().CreateHazard(s.x, s.y);
                LogicWraper.AddHazardPoint((int)s.y, (int)s.x);
            }

            foreach (Spot s in SpotList)
            {
                LogicWraper.addExplorationPoint((int)s.y, (int)s.x);
            }
            LogicWraper.start();
        }
Example #13
0
    public Wall()
    {
        GraphicManager graphicManager = GraphicManager.getInstance();

        texture = graphicManager.LoadTexture("wall");
        mat     = graphicManager.getMat();
        Debug.Log("\tWall created with texture " + texture);
    }
Example #14
0
    public static GraphicManager getInstance()
    {
        if (instance == null)
        {
            instance = new GraphicManager();
        }

        return(instance);
    }
Example #15
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize( )
        {
            this.GraphicManager = new GraphicManager(this.Content);
            this.AudioManager   = new AudioManager(this.Content);

            this.Renderer             = new GameRenderer( );
            this.GameProcessorManager = new GameProcessorManager( );

            base.Initialize( );
        }
        public static List <GraphicObjectProxy> ToGraphicObjectProxyList(this GraphicManager manager)
        {
            List <GraphicObjectProxy> list = new List <GraphicObjectProxy>();

            foreach (var go in manager)
            {
                GraphicObjectProxy proxy = new GraphicObjectProxy(go);
                list.Add(proxy);
            }

            return(list);
        }
Example #17
0
        /// <summary>
        /// 起動用TSVをロード
        /// </summary>
        /// <param name="url">CSVのパス</param>
        /// <param name="version">シナリオバージョン(-1以下で必ずサーバーからデータを読み直す)</param>
        /// <returns></returns>
        IEnumerator CoLoadChapter(string url, int version)
        {
            yield return(StartCoroutine(DataManager.CoLoadChapter(url, version)));

            AdvChapterData chapter = DataManager.InitChapterData(url);

            //設定データを反映
            GraphicManager.Remake(DataManager.SettingDataManager.LayerSetting);
            //パラメーターをデフォルト値でリセット
            Param.InitDefaultAll(DataManager.SettingDataManager.DefaultParam);
            //リソースファイル(画像やサウンド)のダウンロードをバックグラウンドで進めておく
            DataManager.StartBackGroundDownloadResourceInChapter(chapter);
        }
        private void CreateSantaInputComponent()
        {
            var            santaInput   = new InputComponent(santaEnt);
            ActionDelegate walk_up_down = (entity, dict) =>
            {
                entity.GetComponent <MovementComponent>().MoveToUp();
            };
            ActionDelegate walk_down_down = (entity, dict) =>
            {
                entity.GetComponent <MovementComponent>().MoveToDown();
            };
            ActionDelegate walk_right_down = (entity, dict) =>
            {
                entity.GetComponent <MovementComponent>().MoveToRight();
            };
            ActionDelegate walk_left_down = (entity, dict) =>
            {
                entity.GetComponent <MovementComponent>().MoveToLeft();
            };

            ActionDelegate walk_up_up = (entity, dict) =>
            {
                entity.GetComponent <MovementComponent>().StopMoveToDirection(MovementComponent.DirectionMovement.UP);
            };
            ActionDelegate walk_down_up = (entity, dict) =>
            {
                entity.GetComponent <MovementComponent>().StopMoveToDirection(MovementComponent.DirectionMovement.DOWN);
            };
            ActionDelegate walk_left_up = (entity, dict) =>
            {
                entity.GetComponent <MovementComponent>().StopMoveToDirection(MovementComponent.DirectionMovement.LEFT);
            };
            ActionDelegate walk_right_up = (entity, dict) =>
            {
                entity.GetComponent <MovementComponent>().StopMoveToDirection(MovementComponent.DirectionMovement.RIGHT);
            };
            ActionDelegate debug_hitbox = (entity, dict) => { GraphicManager.DebugHitbox(); };

            santaInput.AddAction("walk_up", OnKey.DOWN, Key.Up, null, walk_up_down);
            //        santaInput.AddAction("walk_up", OnKey.UP, Key.Up, null, walk_up_up);
            santaInput.AddAction("walk_down", OnKey.DOWN, Key.Down, null, walk_down_down);
            //        santaInput.AddAction("walk_down", OnKey.UP, Key.Down, null, walk_down_up);
            santaInput.AddAction("walk_left", OnKey.DOWN, Key.Left, null, walk_left_down);
            //       santaInput.AddAction("walk_left", OnKey.UP, Key.Left, null, walk_left_up);
            santaInput.AddAction("walk_right", OnKey.DOWN, Key.Right, null, walk_right_down);
            //       santaInput.AddAction("walk_right", OnKey.UP, Key.Right, null, walk_right_up);
            santaInput.AddAction("debug_hitbox", OnKey.PRESSED, Key.F1, null, debug_hitbox);

            santaEnt.AddComponent(santaInput);
        }
Example #19
0
    public void Init()
    {
        healthSystem = GetComponent <HealthSystem>();
        battleSystem = GetComponent <BattleSystem>();
        actionSystem = GetComponent <ActionSystem>();
        moveSystem   = GetComponent <MoveSystem>();

        specManager    = GetComponent <SpecManager>();
        graphicManager = GetComponent <GraphicManager>();
        guardManager   = GetComponent <GuardManager>();

        healthSystem.Init();
        battleSystem.Init();
        graphicManager.Init();
    }
 public void Clear()
 {
     Page.Clear();
     SelectionManager.Clear();
     BacklogManager.Clear();
     GraphicManager.Clear();
     TransitionManager.Clear();
     if (UiManager != null)
     {
         UiManager.Close();
     }
     SoundManager.StopBgm();
     SoundManager.StopAmbience();
     ClearCustomCommand();
     ScenarioPlayer.Clear();
 }
Example #21
0
        public void AllShipsAreThere()
        {
            List <Ship> playerShips   = InitializePlayerShips();
            List <Ship> computerShips = InitializePcShips();


            string result = GraphicManager.DisplayBattleTables(playerShips, computerShips);

            bool isExist1 = result.Contains("AircraftCarrier");
            bool isExist2 = result.Contains("BattleShip");
            bool isExist3 = result.Contains("Cruiser");


            isExist1.Should().BeTrue();
            isExist2.Should().BeTrue();
            isExist3.Should().BeTrue();
        }
Example #22
0
 protected override void OnLoadingContent()
 {
     content = ContentManager.Create("Content\\Resources");
     System.ContentManagement.ContentManager.Initialize(Ultraviolet, content);
     GUIManager.Initialize(Ultraviolet, content);
     GraphicManager.Initialize(Ultraviolet);
     CollisionManager.Initialize(world);
     CameraManager.Initialize(Ultraviolet);
     AudioManager.Initialize(Ultraviolet);
     InputManager.Initialize();
     MovementManager.Initialize();
     RuleManager.Initialize();
     base.OnLoadingContent();
     EntityManager.PostContentLoad();
     GUIManager.FetchGuiComponents();
     GUIManager.DisplayGuiScreen();
 }
Example #23
0
        public static void DisablePLBlockInput(this BlockEditorControlBase ladder)
        {
            PLBlockEditorControlElementProxy pLBlockEditorControlElementProxy =
                new PLBlockEditorControlElementProxy(ladder);

            List <NetworkElementProxy> networks = pLBlockEditorControlElementProxy.GetNetworks();

            foreach (NetworkElementProxy network in networks)
            {
                List <IUIControl>     networkChildren = network.LanguagePaletteBaseElement.GetChildUIControls();
                CommandTextBoxElement Title           = network.CommandTextBoxElement;
                Title.BackColor = Color.Red;

                CollapsableTextBoxElement CommentElement = network.CommentElement;
                CommentElement.BackColor = Color.Yellow;


                TagCommentElement NetworkTagCommentElement = network.NetworkTagCommentElement;
                NetworkTagCommentElement.BackColor = Color.Blue;

                SimaticFLGraphicEditor SimaticFLGraphicEditor = network.SimaticFLGraphicEditor;
                SimaticFLGraphicEditor.BackColor = Color.Gold;

                SimaticFLGraphicEditor.Enabled = false;


                FLGViewAccessibleObjectProxy FLGViewAccessibleObjectProxy = FLGViewExtensions.GetCorrectAccessibilityObject(SimaticFLGraphicEditor);

                GraphicManager manager = SimaticFLGraphicEditor.GetGraphicManager();

                List <GraphicObjectProxy> list = manager.ToGraphicObjectProxyList();
                foreach (GraphicObjectProxy proxy in list)
                {
                    if (proxy.SupportEdit)
                    {
                        IFLGEditBoxHandler handler = proxy.EditBoxHandler;

                        AccessibleObject AccessibleObject = FLGViewAccessibleObjectProxy.GetAccessibleChildObject(proxy);
                    }
                }
            }

            pLBlockEditorControlElementProxy.FavouritsToolBar.Visible   = false;
            pLBlockEditorControlElementProxy.BlockHeaderPalette.Visible = false;
        }
Example #24
0
        public void ComputerCruiserHasSunken()
        {
            List <Ship> playerShips   = InitializePlayerShips();
            List <Ship> computerShips = InitializePcShips();

            // PC Cruiser Sunken
            ShootManager shootManager = new ShootManager();

            shootManager.RemoveHitPosition(new Position(2, 0), computerShips);
            shootManager.RemoveHitPosition(new Position(2, 1), computerShips);
            shootManager.RemoveHitPosition(new Position(2, 2), computerShips);

            string result = GraphicManager.DisplayBattleTables(playerShips, computerShips);

            bool isExist3 = result.Contains("Cruiser");

            isExist3.Should().BeTrue();
        }
Example #25
0
        /// <summary>
        /// Выполнить инициализацию панели
        /// </summary>
        /// <param name="_panel">Цифровая панель</param>
        /// <param name="_manager">Управляющий графическим компонентом</param>
        public void init(NumericTable.Panel _panel, GraphicManager _manager)
        {
            if (Interlocked.Read(ref initialized) == 0)
            {
                panel   = _panel;
                manager = _manager;

                InitializeGraphicPanel();
                InitializeNumericPanelItems();

                manager.Update();

                manager.UpdatePeriod = 1000;
                manager.Mode         = GraphicComponent.DrawMode.Activ;

                Interlocked.Exchange(ref initialized, 1);
            }
        }
Example #26
0
        /// <summary>
        /// Выполнить инициализацию панели
        /// </summary>
        /// <param name="_panel">Цифровая панель</param>
        /// <param name="_manager">Управляющий графическим компонентом</param>
        public void init(NumericTable.Panel _panel, GraphicManager _manager_1,
                         GraphicManager _manager_2, GraphicManager _manager_3)
        {
            if (Interlocked.Read(ref initialized) == 0)
            {
                n_panel = _panel;

                g_panel_1.GManager = _manager_1;
                g_panel_2.GManager = _manager_2;
                g_panel_3.GManager = _manager_3;

                DateTime now = DateTime.Now;

                g_panel_1.GManager.StartTime = now;
                g_panel_2.GManager.StartTime = now;
                g_panel_3.GManager.StartTime = now;

                g_panel_1.GManager.Orientation = Orientation.Vertical;
                g_panel_2.GManager.Orientation = Orientation.Vertical;
                g_panel_3.GManager.Orientation = Orientation.Vertical;

                InitializeGraphicPanel();
                InitializeNumericPanelItems();

                g_panel_1.GManager.OnDataNeed += new EventHandler(manager_OnDataNeed_1);
                g_panel_2.GManager.OnDataNeed += new EventHandler(manager_OnDataNeed_2);
                g_panel_3.GManager.OnDataNeed += new EventHandler(manager_OnDataNeed_3);

                g_panel_1.GManager.Update();
                g_panel_2.GManager.Update();
                g_panel_3.GManager.Update();

                g_panel_1.GManager.UpdatePeriod = 1000;
                g_panel_1.GManager.Mode         = DrawMode.Activ;

                g_panel_2.GManager.UpdatePeriod = 1000;
                g_panel_2.GManager.Mode         = DrawMode.Activ;

                g_panel_3.GManager.UpdatePeriod = 1000;
                g_panel_3.GManager.Mode         = DrawMode.Activ;

                Interlocked.Exchange(ref initialized, 1);
            }
        }
Example #27
0
        public VBattle(BattleParams param)
        {
            this.collider = GameObject.Find("Collider").GetComponent <BoxCollider>();
            this._rid     = param.id;
            this.data     = ModelFactory.GetBattleData(Utils.GetIDFromRID(this._rid));

            Camera mainCamera = GameObject.Find("Camera").GetComponent <Camera>();

            this.camera = new GodCamera(mainCamera, this.data.camera);
            this.input  = new PointerInput(mainCamera);
            this.input.RegisterInteractive(this);
            this.interaction = new Interaction(this);

            this._debugDrawer   = new DebugDrawer();
            this.graphicManager = new GraphicManager();
            this._entityManager = new VEntityManager(this);
            this._buffManager   = new VBuffManager(this);

            EventCenter.AddListener(SyncEventType.BATTLE_DESTROIED, this.HandleBattleDestroied);
            EventCenter.AddListener(SyncEventType.SPAWN_ENTITY, this.HandleSpawnEntity);
            EventCenter.AddListener(SyncEventType.DESPAWN_ENTITY, this.HandleDespawnEntity);
            EventCenter.AddListener(SyncEventType.ENTITY_ATTR_CHANGED, this.HandleEntityAttrChanged);
            EventCenter.AddListener(SyncEventType.SKILL_ATTR_CHANGED, this.HandleSkillAttrChanged);
            EventCenter.AddListener(SyncEventType.BUFF_ATTR_CHANGED, this.HandleBuffAttrChanged);
            EventCenter.AddListener(SyncEventType.ENTITY_ATTR_INITIALIZED, this.HandleEntityAttrInitialized);
            EventCenter.AddListener(SyncEventType.BUFF_ATTR_INITIALIZED, this.HandleBuffAttrInitialized);
            EventCenter.AddListener(SyncEventType.ENTITY_STATE_CHANGED, this.HandleEntityStateChanged);
            EventCenter.AddListener(SyncEventType.SPAWN_BUFF, this.HandleSpawnBuff);
            EventCenter.AddListener(SyncEventType.DESPAWN_BUFF, this.HandleDespawnBuff);
            EventCenter.AddListener(SyncEventType.ENTER_BUFF, this.HandleEnterBuff);
            EventCenter.AddListener(SyncEventType.EXIT_BUFF, this.HandleExitBuff);
            EventCenter.AddListener(SyncEventType.BUFF_TRIGGERED, this.HandleBuffTriggered);
            EventCenter.AddListener(SyncEventType.TRIGGER_TARGET, this.HandleTriggerTarget);
            EventCenter.AddListener(SyncEventType.BUFF_STATE_ADDED, this.HandleBuffStateAdded);
            EventCenter.AddListener(SyncEventType.BUFF_STATE_REMOVED, this.HandleBuffStateRemoved);
            EventCenter.AddListener(SyncEventType.BUFF_STATE_TRIGGERED, this.HandleBuffStateTriggered);
            EventCenter.AddListener(SyncEventType.ENTITY_RELIVE, this.HandleRelive);
            EventCenter.AddListener(SyncEventType.DAMAGE, this.HandleDamage);
            EventCenter.AddListener(SyncEventType.ENTITY_DIE, this.HandleEntityDie);
            EventCenter.AddListener(SyncEventType.MISSILE_COMPLETE, this.HandleMissileComplete);
            EventCenter.AddListener(SyncEventType.DEBUG_DRAW, this.HandleDebugDraw);
        }
Example #28
0
        protected override void InternalDispose()
        {
            EventCenter.RemoveListener(SyncEventType.BATTLE_DESTROIED, this.HandleBattleDestroied);
            EventCenter.RemoveListener(SyncEventType.SPAWN_ENTITY, this.HandleSpawnEntity);
            EventCenter.RemoveListener(SyncEventType.DESPAWN_ENTITY, this.HandleDespawnEntity);
            EventCenter.RemoveListener(SyncEventType.ENTITY_ATTR_CHANGED, this.HandleEntityAttrChanged);
            EventCenter.RemoveListener(SyncEventType.SKILL_ATTR_CHANGED, this.HandleSkillAttrChanged);
            EventCenter.RemoveListener(SyncEventType.BUFF_ATTR_CHANGED, this.HandleBuffAttrChanged);
            EventCenter.RemoveListener(SyncEventType.ENTITY_ATTR_INITIALIZED, this.HandleEntityAttrInitialized);
            EventCenter.RemoveListener(SyncEventType.BUFF_ATTR_INITIALIZED, this.HandleBuffAttrInitialized);
            EventCenter.RemoveListener(SyncEventType.ENTITY_STATE_CHANGED, this.HandleEntityStateChanged);
            EventCenter.RemoveListener(SyncEventType.SPAWN_BUFF, this.HandleSpawnBuff);
            EventCenter.RemoveListener(SyncEventType.DESPAWN_BUFF, this.HandleDespawnBuff);
            EventCenter.RemoveListener(SyncEventType.ENTER_BUFF, this.HandleEnterBuff);
            EventCenter.RemoveListener(SyncEventType.EXIT_BUFF, this.HandleExitBuff);
            EventCenter.RemoveListener(SyncEventType.BUFF_TRIGGERED, this.HandleBuffTriggered);
            EventCenter.RemoveListener(SyncEventType.TRIGGER_TARGET, this.HandleTriggerTarget);
            EventCenter.RemoveListener(SyncEventType.BUFF_STATE_ADDED, this.HandleBuffStateAdded);
            EventCenter.RemoveListener(SyncEventType.BUFF_STATE_REMOVED, this.HandleBuffStateRemoved);
            EventCenter.RemoveListener(SyncEventType.BUFF_STATE_TRIGGERED, this.HandleBuffStateTriggered);
            EventCenter.RemoveListener(SyncEventType.ENTITY_RELIVE, this.HandleRelive);
            EventCenter.RemoveListener(SyncEventType.DAMAGE, this.HandleDamage);
            EventCenter.RemoveListener(SyncEventType.ENTITY_DIE, this.HandleEntityDie);
            EventCenter.RemoveListener(SyncEventType.MISSILE_COMPLETE, this.HandleMissileComplete);
            EventCenter.RemoveListener(SyncEventType.DEBUG_DRAW, this.HandleDebugDraw);

            this._debugDrawer = null;
            this._entityManager.Dispose();
            this._buffManager.Dispose();
            this.interaction.Dispose();
            this.input.UnregisterInteractive(this);
            this.input.Dispose();
            this.graphicManager.Dispose();
            this.graphicManager = null;
            this._entityManager = null;
            this._buffManager   = null;
            this._context       = null;
            this.data           = null;

            base.InternalDispose();
        }
Example #29
0
        /// <summary>
        /// Load 되었을때 >> Aplication Init();
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void InteractiveUI_Load(object sender, EventArgs e)
        {
            if (!GraphicManager.GetManager().InitDX(this.GraphicView))
            {
                MessageBox.Show("Could not initialize Direct3D.");
            }
            GraphicManager.GetManager().RenderInit();


            //60프레임으로 고정
            VeiwFrameTimer = new FrameTimer(500);
            VeiwFrameTimer.AddTickEvent(() =>
            {
                GraphicManager.GetManager().Render();
            });
            VeiwFrameTimer.Start();


            SpotList   = new List <Spot>();
            HazardList = new List <Spot>();
        }
Example #30
0
        private ParametersViewPanel panelView;              // отображаемая панель

        /// <summary>
        /// инициализирует новый экземпляр класса
        /// </summary>
        public ParametersViewForm()
        {
            InitializeComponent();

            _app    = Application.CreateInstance();
            manager = graphicsSheet1.InstanceManager();

            manager.Mode        = GraphicComponent.DrawMode.PassivScroll;
            manager.Orientation = GraphicComponent.Orientation.Horizontal;

            manager.UpdatePeriod = 500;

            graphics = new Graphic[5];
            for (int index = 0; index < graphics.Length; index++)
            {
                graphics[index] = manager.InstanceGraphic();

                graphics[index].Range.Min = 0;
                graphics[index].Range.Max = 65535;
            }
        }