Example #1
0
    ActionResult?CheckFrameAction(EntityState aEntityState)
    {
        if (aEntityState.mobData?.canFall != true)
        {
            return(null);
        }
        EntityAction currentEntityAction = this.stateMachine.GetState() as EntityAction;

        Debug.Assert(currentEntityAction != null);
        if (!currentEntityAction.canBeInterrupted)
        {
            return(null);
        }
        FallAction   fallAction       = new FallAction(this.id);
        ActionResult fallActionResult = fallAction.GetActionResult(GM.boardManager.currentState);

        if (fallActionResult.boardState != null)
        {
            return(fallActionResult);
        }
        ExitAction   exitAction       = new ExitAction(this.id);
        ActionResult exitActionResult = exitAction.GetActionResult(GM.boardManager.currentState);

        if (exitActionResult.boardState != null)
        {
            return(exitActionResult);
        }
        return(null);
    }
Example #2
0
        void AnimateFallAction(FallAction action)
        {
            var c    = action.coord;
            var pc   = Remove(c);
            var newc = c.Move(0, -action.rows);

            AnimateFallTo(pc, newc);
            Set(newc, pc);
        }
 public static void doDone(FallAction actionObject)
 {
     SceneViews.instance.getCurFBScene().getActor(actionObject.objectID).setAnimatorTrigger("fall");
 }