Exemple #1
0
 private void InitCamActions(GameActionStore actionStore)
 {
     //注册操作
     actionStore.RegisterActions(
         new string[] {
         "CamStart",
         "CamClose",
         "CamSetNoLookAtBall",
         "CamSetLookAtBall",
         "CamSetJustLookAtBall",
         "CamRoteLeft",
         "CamRoteRight",
         "CamRoteSpace",
         "CamRoteSpaceBack",
     },
         TAG,
         new GameActionHandlerDelegate[]
     {
         (param) => {
             CamStart();
             return(GameActionCallResult.SuccessResult);
         },
         (param) => {
             CamClose();
             return(GameActionCallResult.SuccessResult);
         },
         (param) => {
             CamSetNoLookAtBall();
             return(GameActionCallResult.SuccessResult);
         },
         (param) => {
             CamSetLookAtBall();
             return(GameActionCallResult.SuccessResult);
         },
         (param) => {
             CamSetJustLookAtBall();
             return(GameActionCallResult.SuccessResult);
         },
         (param) => {
             CamRoteLeft();
             return(GameActionCallResult.SuccessResult);
         },
         (param) => {
             CamRoteRight();
             return(GameActionCallResult.SuccessResult);
         },
         (param) => {
             CamRoteSpace();
             return(GameActionCallResult.SuccessResult);
         },
         (param) => {
             CamRoteSpaceBack();
             return(GameActionCallResult.SuccessResult);
         },
     },
         null
         );
 }
Exemple #2
0
 protected override bool InitActions(GameActionStore actionStore)
 {
     actionStore.RegisterActions(
         new string[] {
         "StartControll", "EndControll", "PlaySmoke", "PlayLighting", "RemoveBallSpeed",
         "AddBallPush", "RemoveBallPush", "RecoverSetPos", "RecoverBallDef", "RecoverBallAtPos", "ActiveBall", "ActiveBallDef",
         "ClearActiveBall", "SmoothMoveBallToPos", "ThrowPieces", "RecoverPieces", "RegisterBall", "UnRegisterBall", "GetRegisteredBall",
     },
         TAG, new GameActionHandlerDelegate[] {
         (param) =>
         {
             StartControll();
             return(GameActionCallResult.SuccessResult);
         },
         (param) =>
         {
             EndControll();
             return(GameActionCallResult.SuccessResult);
         },
         (param) =>
         {
             PlaySmoke();
             return(GameActionCallResult.SuccessResult);
         },
         (param) =>
         {
             PlayLighting((bool)param[0], (bool)param[1]);
             return(GameActionCallResult.SuccessResult);
         },
         (param) =>
         {
             RemoveBallSpeed((GameBall)param[0]);
             return(GameActionCallResult.SuccessResult);
         },
         (param) =>
         {
             AddBallPush((BallPushType)param[0]);
             return(GameActionCallResult.SuccessResult);
         },
         (param) =>
         {
             RemoveBallPush((BallPushType)param[0]);
             return(GameActionCallResult.SuccessResult);
         },
         (param) =>
         {
             RecoverSetPos((Vector3)param[0]);
             return(GameActionCallResult.SuccessResult);
         },
         (param) =>
         {
             RecoverBallDef();
             return(GameActionCallResult.SuccessResult);
         },
         (param) =>
         {
             RecoverBallAtPos((Vector3)param[0]);
             return(GameActionCallResult.SuccessResult);
         },
         (param) =>
         {
             ActiveBall((string)param[0]);
             return(GameActionCallResult.SuccessResult);
         },
         (param) =>
         {
             ActiveBallDef();
             return(GameActionCallResult.SuccessResult);
         },
         (param) =>
         {
             ClearActiveBall();
             return(GameActionCallResult.SuccessResult);
         },
         (param) =>
         {
             SmoothMoveBallToPos((Vector3)param[0]);
             return(GameActionCallResult.SuccessResult);
         },
         (param) =>
         {
             if (param[0] is string)
             {
                 ThrowPieces(param[0] as string);
             }
             else if (param[0] is GameBall)
             {
                 ThrowPieces(param[0] as GameBall);
             }
             return(GameActionCallResult.SuccessResult);
         },
         (param) =>
         {
             if (param[0] is string)
             {
                 RecoverPieces(param[0] as string);
             }
             else if (param[0] is GameBall)
             {
                 RecoverPieces(param[0] as GameBall);
             }
             return(GameActionCallResult.SuccessResult);
         },
         (param) =>
         {
             return(GameActionCallResult.CreateActionCallResult(
                        RegisterBall((string)param[0], (GameBall)param[1], (GameObject)param[2])
                        ));
         },
         (param) =>
         {
             return(GameActionCallResult.CreateActionCallResult(UnRegisterBall((string)param[0])));
         },
         (param) =>
         {
             return(GameActionCallResult.CreateActionCallResult(
                        true,
                        new object[] {
                 GetRegisteredBall((string)param[0])
             }
                        ));
         },
     },
         new string[][]
     {
         null,
         null,
         null,
         new string[] { "System.Boolean", "System.Boolean" },
         new string[] { "Ballance2.CoreGame.GamePlay.GameBall" },
         new string[] { "Ballance2.CoreGame.GamePlay.BallPushType" },
         new string[] { "Ballance2.CoreGame.GamePlay.BallPushType" },
         new string[] { "UnityEngine.Vector3" },
         null,
         new string[] { "UnityEngine.Vector3" },
         new string[] { "System.String" },
         null,
         null,
         new string[] { "UnityEngine.Vector3" },
         new string[] { "System.String/Ballance2.CoreGame.GamePlay.BallPushType" },
         new string[] { "System.String/Ballance2.CoreGame.GamePlay.BallPushType" },
         new string[] { "System.String", "Ballance2.CoreGame.GamePlay.BallPushType", "UnityEngine.GameObject/null" },
         new string[] { "System.String" },
         new string[] { "System.String" },
     }
         );
     return(base.InitActions(actionStore));
 }