Example #1
0
    private void switchCameraOperation(CameraOperation cameraOperation)
    {
        switch (this.cameraOperation)
        {
        case CameraOperation.CameraOperation_Hide:
            mainCamera.enabled = true;
            break;

        case CameraOperation.CameraOperation_LookAtPosition:
            break;

        case CameraOperation.CameraOperation_LookAtTarget:
            mainCamera.transform.SetParent(null);
            break;

        case CameraOperation.CameraOperation_FollowTarget:
            break;

        case CameraOperation.CameraOperation_ScreenControl:
            break;

        default:
            break;
        }

        switch (cameraOperation)
        {
        case CameraOperation.CameraOperation_Hide:
            mainCamera.enabled = false;
            break;

        case CameraOperation.CameraOperation_LookAtPosition:
            break;

        case CameraOperation.CameraOperation_LookAtTarget:
            break;

        case CameraOperation.CameraOperation_FollowTarget:
            break;

        case CameraOperation.CameraOperation_ScreenControl:
            break;

        default:
            break;
        }

        this.cameraOperation = cameraOperation;
    }
Example #2
0
 private void ApplyToCameras(CameraOperation operation)
 {
     operation(SteamCam.GetComponent <Camera>());
     //operation(SteamCam.head.GetComponent<Camera>());
 }
Example #3
0
 private bool HasField(CameraOperation operation)
 {
     return (abilities.operations & operation) == operation;
 }
 private bool HasField(CameraOperation operation)
 {
     return((abilities.operations & operation) == operation);
 }
Example #5
0
 public void ApplyToCameras(CameraOperation operation)
 {
     operation(LeftEye.camera);
     operation(RightEye.camera);
 }
Example #6
0
    public void Start()
    {
        this.LookMode  = false;
        this.windOnOff = false;
        this.timeData  = Time.realtimeSinceStartup;

        this.expression = 0f;

        this.oldLookPos = Vector3.zero;
        if (this.LookTarget != null)
        {
            this.oldLookPos = this.LookTarget.transform.position;
        }

        GameObject CameraObj = GameObject.FindWithTag("MainCamera");
        GameObject InfoObj   = GameObject.Find("CanvasInfo/info");

        if (InfoObj != null)
        {
            Text infoTextObj = InfoObj.GetComponent <Text>();

            if (infoTextObj != null)
            {
                this.infoText = infoTextObj;
            }
        }
        else
        {
            Debug.Log("InfoObj Null!");
        }

        if (this.AnimatorObject != null)
        {
            this.animator = this.AnimatorObject.GetComponent <Animator>();
        }

        if (CameraObj != null)
        {
            this.CamOpe = CameraObj.GetComponent <CameraOperation>();
            this.RotTes = CameraObj.GetComponent <RotationTest>();

            this.camTra = CameraObj.transform;
        }
        else
        {
            Debug.Log("CameraObj Null!");
        }

        if (this.CamOpe == null)
        {
            Debug.Log("CameraOperation Null!");
        }

        if (this.RotTes == null)
        {
            Debug.Log("RotationTest Null!");
        }

        if (this.TLSObject != null)
        {
            TargetLookSet[] tlSa = this.TLSObject.GetComponents <TargetLookSet>();
            if (tlSa != null)
            {
                for (int ti = 0; ti < tlSa.Length; ti++)
                {
                    for (int oi = 0; oi < tlSa[ti].OperationObj.Length; oi++)
                    {
                        if (tlSa[ti].OperationObj[oi].transform.name == "Head")
                        {
                            this.targetlS = tlSa[ti];
                        }
                    }
                }
            }
        }
        else
        {
            Debug.Log("TLSObject Null!");
        }


        GameObject DollEventObj = GameObject.Find("DollEventSystem");

        if (DollEventObj != null)
        {
            this.ddSst = DollEventObj.GetComponents <DemoDataSet>();

            if (this.ddSst != null)
            {
                for (int di = 0; di < this.ddSst.Length; di++)
                {
                    if (this.ddSst[di].EffectName == "SHEffect")
                    {
                        this.sjWco = this.ddSst[di].sjClass;
                    }
                }
            }
        }
    }