PlayerWillMoveOrNot <InitialParamType, UpdateParamType> (Auto <InitialParamType, UpdateParamType> baseAuto, int frame, InitialParamType fixedContext) { var conditions = baseAuto.Conditions(); /* * 移動開始 */ if ( ConditionGateway.NotContains(conditions, AutoConditions.Act.SPAWN) && ConditionGateway.Contains(conditions, AutoConditions.Act.DEFAULT) && ConditionGateway.ContainsAll(conditions, AutoConditions.Act.DEFAULT) && ConditionGateway.NotContainsAll(conditions, AutoConditions.Act.SPAWN) ) { Debug.Log("歩行条件を満たした!"); var newAuto = new MoveAuto <InitialParamType, UpdateParamType>(frame, fixedContext); // inheritがある場合、ここにinherit処理が付く。 newAuto.InheritTimelines(baseAuto.ExportTimelines(new Type[] { typeof(AutoConditions.Move) })); return(newAuto); } return(baseAuto); }
TestRoute2 <InitialParamType, UpdateParamType> (Auto <InitialParamType, UpdateParamType> baseAuto, int frame, InitialParamType fixedContext) { var finallyAuto = new MoveAuto <InitialParamType, UpdateParamType>(frame, fixedContext); finallyAuto.InheritTimelines(baseAuto.ExportTimelines(new Type[] { typeof(AutoConditions.Move) })); return(finallyAuto); }
TestRoute3 <InitialParamType, UpdateParamType> (Auto <InitialParamType, UpdateParamType> baseAuto, int frame, InitialParamType fixedContext) { var conditions = baseAuto.Conditions(); /* * comment for branchName0 */ if ( ConditionGateway.Contains(conditions, AutoConditions.Act.SPAWN) ) { var newAuto = new MoveAuto <InitialParamType, UpdateParamType>(frame, fixedContext); newAuto.InheritTimelines(baseAuto.ExportTimelines(new Type[] { typeof(AutoConditions.Move) })); return(newAuto); } /* * comment for branchName1 */ if ( ConditionGateway.Contains(conditions, AutoConditions.Act.SPAWN) ) { return(baseAuto); } var finallyAuto = new MoveAuto <InitialParamType, UpdateParamType>(frame, fixedContext); finallyAuto.InheritTimelines(baseAuto.ExportTimelines(new Type[] { typeof(AutoConditions.Move) })); return(finallyAuto); }