Beispiel #1
0
    public List<ImNode> CorrespondingNodesInNodeLayer(ImNodeLayer nodeLayer)
    {
        List<ImNode> nodes = new List<ImNode>();

        ImNode fromNode = nodeLayer.NodeForPlacement(veinEndpoints.fromNodePlacement);
        ImNode toNode = nodeLayer.NodeForPlacement(veinEndpoints.toNodePlacement);

        if (fromNode != null) nodes.Add(fromNode);
        if (toNode != null) nodes.Add(toNode);

        return nodes;
    }
Beispiel #2
0
    public List <ImNode> CorrespondingNodesInNodeLayer(ImNodeLayer nodeLayer)
    {
        List <ImNode> nodes = new List <ImNode>();

        ImNode fromNode = nodeLayer.NodeForPlacement(veinEndpoints.fromNodePlacement);
        ImNode toNode   = nodeLayer.NodeForPlacement(veinEndpoints.toNodePlacement);

        if (fromNode != null)
        {
            nodes.Add(fromNode);
        }
        if (toNode != null)
        {
            nodes.Add(toNode);
        }

        return(nodes);
    }
Beispiel #3
0
 public ImNode CorrespondingNodeInNodeLayer(ImNodeLayer nodeLayer)
 {
     NodePlacement nodePlacement = ImConfig.NodePlacementForOrganType(organType_);
     return nodeLayer.NodeForPlacement(nodePlacement);
 }
Beispiel #4
0
    public WTImmunity()
        : base("")
    {
        instance = this;

        Futile.AddStage(this);

        gameLayer = new FContainer();
        gameLayer.x = Futile.screen.halfWidth;
        gameLayer.y = Futile.screen.halfHeight;
        gameLayer.scale = 0.23f;
        zoomLevel_ = gameLayer.scale;
        AddChild(gameLayer);

        inventory = new List<ImAbstractItem>();
        inventory.Add(new ImHealthPill("Health Pill", 15));
        inventory.Add(new ImPoisonPill("Poison Pill", 6));
        inventory.Add(new ImPoisonPill("Poison Pill", 17));
        inventory.Add(new ImHealthPill("Health Pill", 5));
        inventory.Add(new ImPoisonPill("Poison Pill", 30));
        inventory.Add(new ImHealthPill("Health Pill", 7));
        inventory.Add(new ImHealthPill("Health Pill", 42));

        float sliceWidth = 460f / 4f;
        float sliceHeight = 436f / 4f;
        int sliceHorizontalCount = 6;
        int sliceVerticalCount = 16;
        float bodyWidth = sliceWidth * sliceHorizontalCount;
        float bodyHeight = sliceHeight * sliceVerticalCount;

        FContainer bodyContainer = new FContainer();
        bodyContainer.x -= bodyWidth / 2f;
        bodyContainer.y -= bodyHeight / 2f;
        gameLayer.AddChild(bodyContainer);

        for (int i = 0; i < sliceVerticalCount; i++) {
            for (int j = 0; j < sliceHorizontalCount; j++) {
                int imageNum = i * sliceHorizontalCount + j + 1;
                string imageName = string.Format("bodySlices/body_{0}.png", imageNum.ToString("D2"));
                FSprite slice = new FSprite(imageName);
                slice.anchorX = slice.anchorY = 0;
                slice.x = j * sliceWidth;
                slice.y = bodyHeight - (i + 1) * sliceHeight;
                bodyContainer.AddChild(slice);
            }
        }

        organLayer = new ImOrganLayer();
        organLayer.owner = this;
        gameLayer.AddChild(organLayer);

        veinLayer = new ImVeinLayer();
        veinLayer.owner = this;
        gameLayer.AddChild(veinLayer);

        nodeLayer = new ImNodeLayer();
        nodeLayer.owner = this;
        gameLayer.AddChild(nodeLayer);

        /*pop = new ImPopoverDialogue(100f, 100f, 4f, PopoverTriangleDirectionType.PointingRight);
        AddChild(pop);*/

        pop = new WTPopoverDialogue(false, "popover!");
        pop.SignalNeedsInventoryRefresh += HandlePopoverNeedsInventoryRefresh;
        pop.SignalItemUsed += HandleItemUsed;
        pop.x = Futile.screen.halfWidth;
        pop.y = Futile.screen.halfHeight;
        pop.width = 200f;
        pop.isVisible = false;
        AddChild(pop);

        uiLayer = new ImUILayer();
        SignalPauseStateChanged += uiLayer.SetTransportBar;
        AddChild(uiLayer);

        ImNode node = nodeLayer.NodeForPlacement(NodePlacement.ElbowRight);
        node.Infect(testVirus);
        node.InfectionComponent().StartInfecting();
    }
Beispiel #5
0
    public WTImmunity() : base("")
    {
        instance = this;

        Futile.AddStage(this);

        gameLayer       = new FContainer();
        gameLayer.x     = Futile.screen.halfWidth;
        gameLayer.y     = Futile.screen.halfHeight;
        gameLayer.scale = 0.23f;
        zoomLevel_      = gameLayer.scale;
        AddChild(gameLayer);

        inventory = new List <ImAbstractItem>();
        inventory.Add(new ImHealthPill("Health Pill", 15));
        inventory.Add(new ImPoisonPill("Poison Pill", 6));
        inventory.Add(new ImPoisonPill("Poison Pill", 17));
        inventory.Add(new ImHealthPill("Health Pill", 5));
        inventory.Add(new ImPoisonPill("Poison Pill", 30));
        inventory.Add(new ImHealthPill("Health Pill", 7));
        inventory.Add(new ImHealthPill("Health Pill", 42));

        float sliceWidth           = 460f / 4f;
        float sliceHeight          = 436f / 4f;
        int   sliceHorizontalCount = 6;
        int   sliceVerticalCount   = 16;
        float bodyWidth            = sliceWidth * sliceHorizontalCount;
        float bodyHeight           = sliceHeight * sliceVerticalCount;

        FContainer bodyContainer = new FContainer();

        bodyContainer.x -= bodyWidth / 2f;
        bodyContainer.y -= bodyHeight / 2f;
        gameLayer.AddChild(bodyContainer);

        for (int i = 0; i < sliceVerticalCount; i++)
        {
            for (int j = 0; j < sliceHorizontalCount; j++)
            {
                int     imageNum  = i * sliceHorizontalCount + j + 1;
                string  imageName = string.Format("bodySlices/body_{0}.png", imageNum.ToString("D2"));
                FSprite slice     = new FSprite(imageName);
                slice.anchorX = slice.anchorY = 0;
                slice.x       = j * sliceWidth;
                slice.y       = bodyHeight - (i + 1) * sliceHeight;
                bodyContainer.AddChild(slice);
            }
        }

        organLayer       = new ImOrganLayer();
        organLayer.owner = this;
        gameLayer.AddChild(organLayer);

        veinLayer       = new ImVeinLayer();
        veinLayer.owner = this;
        gameLayer.AddChild(veinLayer);

        nodeLayer       = new ImNodeLayer();
        nodeLayer.owner = this;
        gameLayer.AddChild(nodeLayer);

        /*pop = new ImPopoverDialogue(100f, 100f, 4f, PopoverTriangleDirectionType.PointingRight);
         * AddChild(pop);*/

        pop = new WTPopoverDialogue(false, "popover!");
        pop.SignalNeedsInventoryRefresh += HandlePopoverNeedsInventoryRefresh;
        pop.SignalItemUsed += HandleItemUsed;
        pop.x         = Futile.screen.halfWidth;
        pop.y         = Futile.screen.halfHeight;
        pop.width     = 200f;
        pop.isVisible = false;
        AddChild(pop);

        uiLayer = new ImUILayer();
        SignalPauseStateChanged += uiLayer.SetTransportBar;
        AddChild(uiLayer);

        ImNode node = nodeLayer.NodeForPlacement(NodePlacement.ElbowRight);

        node.Infect(testVirus);
        node.InfectionComponent().StartInfecting();
    }
Beispiel #6
0
    public ImNode CorrespondingNodeInNodeLayer(ImNodeLayer nodeLayer)
    {
        NodePlacement nodePlacement = ImConfig.NodePlacementForOrganType(organType_);

        return(nodeLayer.NodeForPlacement(nodePlacement));
    }