示例#1
0
        // EXECUTABLE: ----------------------------------------------------------------------------

        public override bool InstantExecute(GameObject target, IAction[] actions, int index)
        {
            if (HookCamera.Instance != null)
            {
                CameraController cameraController = HookCamera.Instance.Get <CameraController>();
                if (cameraController != null)
                {
                    CameraMotor motor = null;
                    if (this.mainCameraMotor)
                    {
                        motor = CameraMotor.MAIN_MOTOR;
                    }
                    else
                    {
                        motor = this.cameraMotor;
                    }

                    if (motor != null)
                    {
                        cameraController.ChangeCameraMotor(
                            motor,
                            this.transitionTime
                            );
                    }
                }
            }

            return(true);
        }
        public override bool InstantExecute(GameObject target, IAction[] actions, int index)
        {
            if (HookCamera.Instance != null)
            {
                CameraController cameraController = HookCamera.Instance.Get <CameraController>();
                if (cameraController != null)
                {
                    CameraMotor motor = null;
                    GameObject  CamGO = this.MyGlobalCam.Get(target) as GameObject;
                    if (CamGO != null)
                    {
                        motor = CamGO.GetComponent <CameraMotor>();
                    }

                    if (motor != null)
                    {
                        cameraController.ChangeCameraMotor(
                            motor,
                            this.transistionTime
                            );
                    }
                }
            }
            return(true);
        }
示例#3
0
        // EXECUTABLE: ----------------------------------------------------------------------------

        public override bool InstantExecute(GameObject target, IAction[] actions, int index)
        {
            if (HookCamera.Instance != null)
            {
                CameraController cameraController = HookCamera.Instance.Get <CameraController>();
                if (cameraController != null)
                {
                    CameraMotor motor = null;
                    if (this.mainCameraMotor)
                    {
                        motor = CameraMotor.MAIN_MOTOR;
                    }
                    else
                    {
                        switch (this.from)
                        {
                        case CameraMotorFrom.CameraMotor:
                            motor = this.cameraMotor;
                            break;

                        case CameraMotorFrom.Variable:
                            GameObject value = this.variable.Get(target) as GameObject;
                            if (value != null)
                            {
                                motor = value.GetComponent <CameraMotor>();
                            }
                            break;
                        }
                    }

                    if (motor != null)
                    {
                        cameraController.ChangeCameraMotor(
                            motor,
                            this.transitionTime
                            );
                    }
                }
            }

            return(true);
        }