Implement effect.
This commit is contained in:
@@ -98,16 +98,21 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
public class EmitEffect : SkinPropertyKey {
|
||||
public int Name { get; set; }
|
||||
public EmitEffect() { }
|
||||
public EmitEffect() {
|
||||
_op = new PropOp.Float(v => _index = v);
|
||||
}
|
||||
public override string ToString() {
|
||||
return string.Format("@emit {0}", IdentifierManager.SharedInstance.Retrieve(Name));
|
||||
}
|
||||
public override bool IsValueRequired { get { return true; } }
|
||||
public override void ExecuteStatic(ISkinnableGroup group, RuntimeSkinContext ctx, PdtExpression exp) {
|
||||
// TODO
|
||||
throw new InvalidOperationException("Emitting effect in static context is not allowed");
|
||||
}
|
||||
float _index;
|
||||
readonly PropOp _op;
|
||||
public override void ExecuteDynamic(ISkinnableGroup group, RuntimeSkinContext ctx, PdtExpression exp, int dl) {
|
||||
// TODO
|
||||
ChartPlayer.etor.Evaluate(_op, exp);
|
||||
ChartPlayer.effectManager.Emit(Name, _index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user