1
0
mirror of https://github.com/oliverbooth/VpSharp synced 2024-11-23 01:08:47 +00:00

Remove Scene files

This functionality will be introduced with upcoming VpSharp.Building library
This commit is contained in:
Oliver Booth 2022-11-30 20:22:32 +00:00
parent 168c6d9177
commit 55eaa4b510
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
2 changed files with 0 additions and 156 deletions

View File

@ -1,139 +0,0 @@
using System.Drawing;
using System.Text;
namespace VpSharp.Scene;
public sealed class FluentAction
{
internal List<FluentActionComponent> Components { get; } = new();
public static FluentActionTrigger Activate()
{
var action = new FluentAction();
var trigger = new FluentActionTrigger(action, Trigger.Activate);
action.Components.Add(trigger);
return trigger;
}
public static FluentActionTrigger Adone()
{
var action = new FluentAction();
var trigger = new FluentActionTrigger(action, Trigger.Adone);
action.Components.Add(trigger);
return trigger;
}
public static FluentActionTrigger Bump()
{
var action = new FluentAction();
var trigger = new FluentActionTrigger(action, Trigger.Bump);
action.Components.Add(trigger);
return trigger;
}
public static FluentActionTrigger BumpEnd()
{
var action = new FluentAction();
var trigger = new FluentActionTrigger(action, Trigger.BumpEnd);
action.Components.Add(trigger);
return trigger;
}
public static FluentActionTrigger Create()
{
var action = new FluentAction();
var trigger = new FluentActionTrigger(action, Trigger.Create);
action.Components.Add(trigger);
return trigger;
}
}
public abstract class FluentActionComponent
{
protected FluentActionComponent(FluentAction action)
{
Action = action;
}
protected internal FluentAction Action { get; }
public FluentActionTrigger Activate()
{
var trigger = new FluentActionTrigger(Action, Trigger.Activate);
Action.Components.Add(trigger);
return trigger;
}
public FluentActionTrigger Adone()
{
var trigger = new FluentActionTrigger(Action, Trigger.Adone);
Action.Components.Add(trigger);
return trigger;
}
public FluentActionTrigger Bump()
{
var trigger = new FluentActionTrigger(Action, Trigger.Bump);
Action.Components.Add(trigger);
return trigger;
}
public FluentActionTrigger BumpEnd()
{
var trigger = new FluentActionTrigger(Action, Trigger.BumpEnd);
Action.Components.Add(trigger);
return trigger;
}
public FluentActionTrigger Create()
{
var trigger = new FluentActionTrigger(Action, Trigger.Create);
Action.Components.Add(trigger);
return trigger;
}
public FluentActionCommand Color(Color color)
{
var builder = new StringBuilder();
builder.Append($"color {color.ToArgb():X6}");
return new FluentActionCommand(Action, Command.Color);
}
public FluentActionCommand Texture(string texture, string? mask = null, string? tag = null)
{
var builder = new StringBuilder();
builder.Append($"texture {texture}");
if (!string.IsNullOrWhiteSpace(mask))
{
builder.Append($" mask={mask}");
}
if (!string.IsNullOrWhiteSpace(tag))
{
builder.Append($" tag={tag}");
}
return new FluentActionCommand(Action, Command.Texture);
}
}
public sealed class FluentActionCommand : FluentActionComponent
{
internal FluentActionCommand(FluentAction action, Command command) : base(action)
{
Command = command;
}
internal Command Command { get; }
}
public sealed class FluentActionTrigger : FluentActionComponent
{
internal FluentActionTrigger(FluentAction action, Trigger trigger) : base(action)
{
Trigger = trigger;
}
internal Trigger Trigger { get; }
}

View File

@ -1,17 +0,0 @@
namespace VpSharp.Scene;
public enum Trigger
{
Activate,
Adone,
Bump,
BumpEnd,
Create
}
public enum Command
{
Animate,
Color,
Texture
}