public override void Initialize()
        {
            transform = Owner.GetComponent<IGodotTransformComponent>();
            debugNode = new Godot.Node2D();
            debugNode.SetName("Collidable debug");
            debugDrawSubscriber = new GodotGlue.GodotSignalSubscriber0();
            debugDrawSubscriber.Connect(debugNode, "draw");
            debugDrawSubscriber.Signal += DrawDebugRect;
            transform.SceneNode.AddChild(debugNode);

            base.Initialize();
        }
Beispiel #2
0
        private void TrackGodotPlayer(Godot.Node player)
        {
            var key    = LastPlayKey++;
            var signal = new GodotGlue.GodotSignalSubscriber0();

            signal.Connect(player, "finished");
            signal.Signal           += () => { CleanupAudioPlayer(key); };
            PlayingGodotStreams[key] = new PlayingGodotStream()
            {
                Player = player,
                Signal = signal
            };
        }
        public void Initialize()
        {
            NetworkManager.RegisterNetMessage <MsgPlacement>(MsgPlacement.NAME, HandlePlacementMessage);

            _modeDictionary.Clear();
            foreach (var type in ReflectionManager.GetAllChildren <PlacementMode>())
            {
                _modeDictionary.Add(type.Name, type);
            }

            _mapMan.TileChanged += HandleTileChanged;
            drawNode             = new Godot.Node2D()
            {
                Name = "Placement Manager Sprite",
            };
            sceneTree.WorldRoot.AddChild(drawNode);
            drawNodeDrawSubscriber = new GodotGlue.GodotSignalSubscriber0();
            drawNodeDrawSubscriber.Connect(drawNode, "draw");
            drawNodeDrawSubscriber.Signal += Render;
        }