public void Draw(DrawArgument args, float alpha) { if (Body == null || Hair == null || Face == null) { return; } var acMove = new Vector2(); if (Action != null) { acMove = Action.Move(); } var relArgs = new DrawArgument(acMove, _flip); var inStance = _stance.Get(alpha); var inExpression = _expression.Get(alpha); var inFrame = _stFrame.Get(alpha); var inExpFrame = _expFrame.Get(alpha); switch (inStance) { case Stance.Id.Stand1: case Stance.Id.Stand2: if (_alerted.Bool) { inStance = Stance.Id.Alert; } break; } var args2 = (relArgs + args); Draw(inStance, inExpression, inFrame, inExpFrame, args2); }
public void Draw(DrawArgument args, float alpha) { var interFrame = _frame.Get(alpha); var interOpc = _opacity.Get(alpha) / 255; var interScale = _xyScale.Get(alpha) / 100; var modifyOpc = !interOpc.Equals(1.0f); var modifyScale = !interScale.Equals(1.0f); if (modifyOpc || modifyScale) { _frames[interFrame].Draw(args + new DrawArgument(interScale, interScale, interOpc)); } else { _frames[interFrame].Draw(args); } }