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(); }
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(); }
public IPrototype[] GetBlueprint(BlueprintTag blueprintTag) { var ea = new DrawingBlueprintEventArgs(blueprintTag); OnDrawingBlueprint(ea); return(ea.Data); }
private void BlueprintProgressBar_DrawingBlueprint(object sender, DrawingBlueprintEventArgs e) { if (e.BlueprintTag != BlueprintTag.ProgressBar) { return; } e.Data = GetProgressBar(); }
private void BlueprintTrap_DrawingBlueprint(object sender, DrawingBlueprintEventArgs e) { if (e.BlueprintTag != BlueprintTag.Trap) { return; } Test(e); }
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(); }
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(); }
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(); }
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) }; }
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) }; }
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(); }
private void BlueprintActor_DrawingBlueprint(object sender, DrawingBlueprintEventArgs e) { Test(e); }
protected virtual void OnDrawingBlueprint(DrawingBlueprintEventArgs e) { DrawingBlueprint?.Invoke(this, e); }