Exemplo n.º 1
0
    public ImNodeLayer()
    {
        for (int i = 0; i < (int)(NodePlacement.MAX - 1); i++) {
            ImNode node = new ImNode((NodePlacement)(i + 1));
            Vector2 pos = ImConfig.PositionForNodePlacement(node.nodePlacement);
            node.x = pos.x;
            node.y = pos.y;

            node.HealthComponent().SignalHealthChanged += NodeHealthChanged;
            entities.Add(node);
            AddChild(node);
        }
    }
Exemplo n.º 2
0
    public ImNodeLayer()
    {
        for (int i = 0; i < (int)(NodePlacement.MAX - 1); i++)
        {
            ImNode  node = new ImNode((NodePlacement)(i + 1));
            Vector2 pos  = ImConfig.PositionForNodePlacement(node.nodePlacement);
            node.x = pos.x;
            node.y = pos.y;

            node.HealthComponent().SignalHealthChanged += NodeHealthChanged;
            entities.Add(node);
            AddChild(node);
        }
    }
Exemplo n.º 3
0
    public void NodeHealthChanged(ImAbstractComponent ac)
    {
        ImNode node = (ImNode)ac.owner;

        node.RadialWipeSpriteComponents()[0].sprite.percentage = node.HealthComponent().currentHealth / node.HealthComponent().maxHealth;
    }