Ejemplo n.º 1
0
        private void Test(DrawingBlueprintEventArgs e)
        {
            if (e.BlueprintTag != BlueprintTag.Actor)
            {
                return;
            }

            // TODO: Change this later.
            Stack <IPrototype> blueprint = new Stack <IPrototype>();

            blueprint.Push(new ProtoObject(MainTag.Actor, SubTag.PC,
                                           new int[] { 0, 8 }));
            blueprint.Push(new ProtoObject(MainTag.Actor, SubTag.Dummy,
                                           new int[] { 0, 0 }));
            blueprint.Push(new ProtoObject(MainTag.Actor, SubTag.Dummy,
                                           new int[] { 0, 4 }));
            blueprint.Push(new ProtoObject(MainTag.Actor, SubTag.Dummy,
                                           new int[] { 8, 0 }));
            blueprint.Push(new ProtoObject(MainTag.Actor, SubTag.Dummy,
                                           new int[] { 8, 2 }));
            blueprint.Push(new ProtoObject(MainTag.Actor, SubTag.Dummy,
                                           new int[] { 8, 4 }));

            e.Data = blueprint.ToArray();
        }
Ejemplo n.º 2
0
        private void BlueprintFloor_DrawingBlueprint(object sender,
                                                     DrawingBlueprintEventArgs e)
        {
            if (e.BlueprintTag != BlueprintTag.Floor)
            {
                return;
            }

            Stack <IPrototype> blueprint = new Stack <IPrototype>();

            for (int i = 0; i < GetComponent <DungeonBoard>().Width; i++)
            {
                for (int j = 0; j < GetComponent <DungeonBoard>().Height;
                     j++)
                {
                    if (GetComponent <SearchObject>().Search(i, j,
                                                             MainTag.Altar, out _))
                    {
                        continue;
                    }
                    blueprint.Push(new ProtoObject(MainTag.Floor, SubTag.Floor,
                                                   new int[] { i, j }));
                }
            }
            e.Data = blueprint.ToArray();
        }
Ejemplo n.º 3
0
        public IPrototype[] GetBlueprint(BlueprintTag blueprintTag)
        {
            var ea = new DrawingBlueprintEventArgs(blueprintTag);

            OnDrawingBlueprint(ea);

            return(ea.Data);
        }
Ejemplo n.º 4
0
 private void BlueprintProgressBar_DrawingBlueprint(object sender,
                                                    DrawingBlueprintEventArgs e)
 {
     if (e.BlueprintTag != BlueprintTag.ProgressBar)
     {
         return;
     }
     e.Data = GetProgressBar();
 }
Ejemplo n.º 5
0
 private void BlueprintTrap_DrawingBlueprint(object sender,
                                             DrawingBlueprintEventArgs e)
 {
     if (e.BlueprintTag != BlueprintTag.Trap)
     {
         return;
     }
     Test(e);
 }
Ejemplo n.º 6
0
        private void BlueprintAltar_DrawingBlueprint(object sender,
                                                     DrawingBlueprintEventArgs e)
        {
            if (e.BlueprintTag != BlueprintTag.Altar)
            {
                return;
            }

            Stack <IPrototype> blueprint = GetShieldAltar();

            blueprint.Push(GetLifeAltar());

            e.Data = blueprint.ToArray();
        }
Ejemplo n.º 7
0
        private void Test(DrawingBlueprintEventArgs e)
        {
            Stack <IPrototype> blueprint = new Stack <IPrototype>();

            blueprint.Push(new ProtoObject(MainTag.Trap, SubTag.EarthTrap,
                                           new int[] { 0, 0 }));
            blueprint.Push(new ProtoObject(MainTag.Trap, SubTag.FireTrap,
                                           new int[] { 0, 1 }));
            blueprint.Push(new ProtoObject(MainTag.Trap, SubTag.LightningTrap,
                                           new int[] { 0, 2 }));
            blueprint.Push(new ProtoObject(MainTag.Trap, SubTag.IceTrap,
                                           new int[] { 0, 3 }));

            e.Data = blueprint.ToArray();
        }
Ejemplo n.º 8
0
        private void BlueprintAltar_DrawingBlueprint(object sender,
                                                     DrawingBlueprintEventArgs e)
        {
            if (e.BlueprintTag != BlueprintTag.Altar)
            {
                return;
            }

            Stack <IPrototype> blueprint = new Stack <IPrototype>();

            foreach (int[] ap in altarPositions)
            {
                blueprint.Push(GetLifeAltar(ap));
            }
            e.Data = blueprint.ToArray();
        }
Ejemplo n.º 9
0
        private void BlueprintExamineMarker_DrawingBlueprint(object sender,
                                                             DrawingBlueprintEventArgs e)
        {
            if (e.BlueprintTag != BlueprintTag.ExamineMarker)
            {
                return;
            }

            int invalid = -999;

            int[] position = new int[] { invalid, invalid };

            e.Data = new IPrototype[]
            {
                new ProtoObject(MainTag.Marker, SubTag.ExamineMarker, position)
            };
        }
Ejemplo n.º 10
0
        private void BlueprintMarker_DrawingBlueprint(object sender,
                                                      DrawingBlueprintEventArgs e)
        {
            if (e.BlueprintTag != BlueprintTag.AimMarker)
            {
                return;
            }

            //GameObject pc = GetComponent<SearchObject>().Search(SubTag.PC)[0];
            int invalid = -999;

            int[] position = new int[] { invalid, invalid };

            e.Data = new IPrototype[]
            {
                new ProtoObject(MainTag.Marker, SubTag.AimMarker, position)
            };
        }
Ejemplo n.º 11
0
        private void Test(DrawingBlueprintEventArgs e)
        {
            Stack <IPrototype> blueprint = new Stack <IPrototype>();

            for (int i = 2; i < 7; i++)
            {
                blueprint.Push(new ProtoObject(MainTag.Trap, SubTag.AirTrap,
                                               new int[] { i, 1 }));
                blueprint.Push(new ProtoObject(MainTag.Trap, SubTag.AirTrap,
                                               new int[] { i, 7 }));

                blueprint.Push(new ProtoObject(MainTag.Trap, SubTag.AirTrap,
                                               new int[] { 1, i }));
                blueprint.Push(new ProtoObject(MainTag.Trap, SubTag.AirTrap,
                                               new int[] { 7, i }));
            }

            e.Data = blueprint.ToArray();
        }
Ejemplo n.º 12
0
 private void BlueprintActor_DrawingBlueprint(object sender,
                                              DrawingBlueprintEventArgs e)
 {
     Test(e);
 }
Ejemplo n.º 13
0
 protected virtual void OnDrawingBlueprint(DrawingBlueprintEventArgs e)
 {
     DrawingBlueprint?.Invoke(this, e);
 }