Example #1
0
    public void OnStart()
    {
        ocuMouse          = GetScript <OcuMouse>(Common.GetSurveillancePlayerMouse());
        player            = Common.GetStealthPlayer();
        playerScript      = GetScript <FirstPersonPlayer>(player);
        camera            = Common.GetStealthPlayerCamera();
        cameraCam         = Common.GetSurveillancePlayerStaticCameraCam();
        camScript         = GetScript <CameraCam>(cameraCam);
        camRotLimitScript = GetScript <CameraRotationLimit>(gameObject);

        heldObjectPosition = GameObject.GetGameObjectByName("HeldObjectPosition");

        sound         = gameObject.RequireComponent <CSound>();
        flyingSoundID = sound.GetUniqueEvent("CAM_FLIGHT.vente", 2);

        camPhysics = gameObject.RequireComponent <CPhysics>();
        camPhysics.mColliderType = 1;
        camMesh       = gameObject.RequireComponent <CMeshRenderer>();
        mInitialScale = (Vector3)gameObject.transform.GetScale();

        nonActive          = new State(smc, State_NonActive_Enter, State_NonActive_Update, State_NonActive_Exit);
        flyingTowardsWall  = new State(smc, State_FlyTowardsWall_Enter, State_FlyTowardsWall_Update, State_FlyTowardsWall_Exit);
        activeOnWall       = new State(smc, State_ActiveOnWall_Enter, State_ActiveOnWall_Update, State_ActiveOnWall_Exit);
        flyingBackToPlayer = new State(smc, State_FlyingBackToPlayer_Enter, State_FlyingBackToPlayer_Update, State_FlyingBackToPlayer_Exit);

        smc.SetState(nonActive); // Initial state
    }
Example #2
0
    public void OnStart()
    {
        surveillanceMouseMesh = Common.GetSurveillancePlayerMouse().RequireComponent<CMeshRenderer>();
        surveillanceMouseScript = GetScript<OcuMouse>(Common.GetSurveillancePlayerMouse());

        rcCar = Common.GetRCCar();
        if (rcCar != null)
            InitCar();
    }
Example #3
0
    public void OnStart()
    {
        surveillanceMouseMesh = Common.GetSurveillancePlayerMouse().RequireComponent<CMeshRenderer>();
        surveillanceMouseScript = GetScript<OcuMouse>(Common.GetSurveillancePlayerMouse());

        rcCar = Common.GetRCCar();
        if (rcCar != null)
            InitCar();
    }
    public void OnStart()
    {
        ocuMouse = GetScript<OcuMouse>(Common.GetSurveillancePlayerMouse() );
        player = Common.GetStealthPlayer();
        playerScript = GetScript<FirstPersonPlayer>(player);
        camera = Common.GetStealthPlayerCamera();
        cameraCam = Common.GetSurveillancePlayerStaticCameraCam();
        camScript = GetScript<CameraCam>(cameraCam);
        camRotLimitScript = GetScript<CameraRotationLimit>(gameObject);

        heldObjectPosition = GameObject.GetGameObjectByName("HeldObjectPosition");

        sound = gameObject.RequireComponent<CSound>();
        flyingSoundID = sound.GetUniqueEvent("CAM_FLIGHT.vente", 2);

        camPhysics = gameObject.RequireComponent<CPhysics>();
        camPhysics.mColliderType = 1;
        camMesh = gameObject.RequireComponent<CMeshRenderer>();
        mInitialScale = (Vector3)gameObject.transform.GetScale();

        nonActive = new State(smc, State_NonActive_Enter, State_NonActive_Update, State_NonActive_Exit);
        flyingTowardsWall = new State(smc, State_FlyTowardsWall_Enter, State_FlyTowardsWall_Update, State_FlyTowardsWall_Exit);
        activeOnWall = new State(smc, State_ActiveOnWall_Enter, State_ActiveOnWall_Update, State_ActiveOnWall_Exit);
        flyingBackToPlayer = new State(smc, State_FlyingBackToPlayer_Enter, State_FlyingBackToPlayer_Update, State_FlyingBackToPlayer_Exit);

        smc.SetState(nonActive); // Initial state
    }