Esempio n. 1
0
    private void FinalCloseBook()
    {
        LocalPlayer.CamRotator.dampingOverride = 0f;
        this.animator.SetBoolReflected("bookHeld", false);
        this.animator.Play(this.toIdleHash, 0, 0f);
        LocalPlayer.Animator.SetBoolReflected("clampSpine", false);
        LocalPlayer.MainRotator.resetOriginalRotation = true;
        if (LocalPlayer.Inventory.CurrentView != PlayerInventory.PlayerViews.Inventory)
        {
            LocalPlayer.FpCharacter.UnLockView();
        }
        this.bookIsOpen = false;
        LocalPlayer.CamRotator.rotationRange = new Vector2(LocalPlayer.FpCharacter.minCamRotationRange, 0f);
        LocalPlayer.CamFollowHead.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
        SimpleMouseRotator camRotator = LocalPlayer.CamRotator;

        camRotator.targetAngles.x = camRotator.targetAngles.x + -20f;
        SimpleMouseRotator camRotator2 = LocalPlayer.CamRotator;

        camRotator2.followAngles.x               = camRotator2.followAngles.x + -20f;
        LocalPlayer.CamRotator.xOffset           = 0f;
        LocalPlayer.CamRotator.fixCameraRotation = true;
        if (!base.IsInvoking("setCloseBook"))
        {
            base.Invoke("setCloseBook", 1f);
        }
        this.survivalBookReal.SendMessage("CloseBook", SendMessageOptions.DontRequireReceiver);
        this.survivalBookAnimated.SetActive(true);
        this.survivalBookReal.SetActive(false);
    }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     disabledOnSceneStart = false;
     eyes           = gameObject.GetComponent <Animation>();
     possMess       = GameObject.Find("Possession Master").GetComponent <PossessionMaster>();
     mouseRotatorLR = gameObject.GetComponent <SimpleMouseRotator>();
     mouseRotatorUD = gameObject.GetComponentsInChildren <SimpleMouseRotator>()[1];
     characterMover = gameObject.GetComponentInChildren <FirstPersonCharacter>();
 }
Esempio n. 3
0
 //if julia was disabled on the screen start we never get her component references
 //adding them here will grab them when we enable her
 void OnEnable()
 {
     if (disabledOnSceneStart)
     {
         eyes                 = gameObject.GetComponent <Animation>();
         mouseRotatorLR       = gameObject.GetComponent <SimpleMouseRotator>();
         mouseRotatorUD       = gameObject.GetComponentInChildren <SimpleMouseRotator>();
         characterMover       = gameObject.GetComponentInChildren <FirstPersonCharacter>();
         disabledOnSceneStart = false;
     }
 }
Esempio n. 4
0
 private void Awake()
 {
     this.camRotator   = GameObject.FindWithTag("MainCamera").GetComponent <SimpleMouseRotator>();
     this.fps          = LocalPlayer.FpCharacter;
     this.animator     = base.transform.GetComponentInChildren <Animator>();
     this.setup        = base.GetComponentInChildren <playerScriptSetup>();
     this.walkSpeed    = this.fps.walkSpeed;
     this.runSpeed     = this.fps.runSpeed;
     this.strafeSpeed  = this.fps.strafeSpeed;
     this.camAnimation = this.camAnim.GetComponent <Animation>();
     this._rb          = base.GetComponent <Rigidbody>();
 }
Esempio n. 5
0
 private void OnDestroy()
 {
     if (LocalPlayer.Transform == base.transform)
     {
         LocalPlayer.Transform = null;
         LocalPlayer.Ridigbody = null;
         FMOD_StudioEventEmitter.LocalPlayerTransform = null;
         LocalPlayer.GameObject         = null;
         LocalPlayer.PlayerBase         = null;
         LocalPlayer.HeadTr             = null;
         LocalPlayer.HipsTr             = null;
         LocalPlayer.Inventory          = null;
         LocalPlayer.ReceipeBook        = null;
         LocalPlayer.SpecialActions     = null;
         LocalPlayer.SpecialItems       = null;
         LocalPlayer.MainCamTr          = null;
         LocalPlayer.MainCam            = null;
         LocalPlayer.InventoryCam       = null;
         LocalPlayer.CamFollowHead      = null;
         LocalPlayer.Animator           = null;
         LocalPlayer.AnimControl        = null;
         LocalPlayer.Create             = null;
         LocalPlayer.Tuts               = null;
         LocalPlayer.Sfx                = null;
         LocalPlayer.Stats              = null;
         LocalPlayer.FpCharacter        = null;
         LocalPlayer.FpHeadBob          = null;
         LocalPlayer.CamRotator         = null;
         LocalPlayer.MainRotator        = null;
         LocalPlayer.ScriptSetup        = null;
         LocalPlayer.TargetFunctions    = null;
         LocalPlayer.HitReactions       = null;
         LocalPlayer.Buoyancy           = null;
         LocalPlayer.WaterViz           = null;
         LocalPlayer.AiInfo             = null;
         LocalPlayer.WaterEngine        = null;
         LocalPlayer.ItemDecayMachine   = null;
         LocalPlayer.AnimatedBook       = null;
         LocalPlayer.PassengerManifest  = null;
         LocalPlayer.GreebleRoot        = null;
         LocalPlayer.MudGreeble         = null;
         LocalPlayer.PlayerDeadCam      = null;
         LocalPlayer.PauseMenuBlur      = null;
         LocalPlayer.PauseMenuBlurPsCam = null;
         LocalPlayer.HeldItemsData      = null;
         LocalPlayer.Vis                = null;
     }
 }
Esempio n. 6
0
 private void Awake()
 {
     LocalPlayer.Transform = this._transform;
     LocalPlayer.Ridigbody = this._ridigbody;
     FMOD_StudioEventEmitter.LocalPlayerTransform = LocalPlayer.Transform;
     LocalPlayer.GameObject         = this._playerGO;
     LocalPlayer.PlayerBase         = this._playerBase;
     LocalPlayer.HeadTr             = this._headTr;
     LocalPlayer.HipsTr             = this._hipsTr;
     LocalPlayer.Inventory          = this._inventory;
     LocalPlayer.ReceipeBook        = this._receipeBook;
     LocalPlayer.SpecialActions     = this._specialActions;
     LocalPlayer.SpecialItems       = this._specialItems;
     LocalPlayer.MainCamTr          = this._mainCamTr;
     LocalPlayer.MainCam            = this._mainCam;
     LocalPlayer.InventoryCam       = this._inventoryCam;
     LocalPlayer.CamFollowHead      = this._camFollowHead;
     LocalPlayer.Animator           = this._animator;
     LocalPlayer.AnimControl        = this._animControl;
     LocalPlayer.Create             = this._create;
     LocalPlayer.Tuts               = this._tuts;
     LocalPlayer.Sfx                = this._sfx;
     LocalPlayer.Stats              = this._stats;
     LocalPlayer.FpCharacter        = this._fpc;
     LocalPlayer.FpHeadBob          = this._fphb;
     LocalPlayer.CamRotator         = this._camRotator;
     LocalPlayer.MainRotator        = this._mainRotator;
     LocalPlayer.ScriptSetup        = this._scriptSetup;
     LocalPlayer.TargetFunctions    = this._targetFunctions;
     LocalPlayer.HitReactions       = this._hitReactions;
     LocalPlayer.Buoyancy           = this._buoyancy;
     LocalPlayer.WaterViz           = this._waterViz;
     LocalPlayer.AiInfo             = this._aiInfo;
     LocalPlayer.WaterEngine        = this._waterEngine;
     LocalPlayer.ItemDecayMachine   = this._itemDecayMachine;
     LocalPlayer.AnimatedBook       = this._animatedBook;
     LocalPlayer.PassengerManifest  = this._passengerManifest;
     LocalPlayer.GreebleRoot        = this._greebleRoot;
     LocalPlayer.MudGreeble         = this._mudGreeble;
     LocalPlayer.PlayerDeadCam      = this._PlayerDeadCam;
     LocalPlayer.PauseMenuBlur      = this._pauseMenuBlur;
     LocalPlayer.PauseMenuBlurPsCam = this._pauseMenuBlurPsCam;
     LocalPlayer.HeldItemsData      = this._heldItemsData;
     LocalPlayer.Vis                = this._vis;
     base.StartCoroutine(this.OldSaveCompat());
 }
Esempio n. 7
0
 private void Awake()
 {
     base.GetComponent <Animation>()["turbulanceLight"].wrapMode     = WrapMode.Loop;
     base.GetComponent <Animation>()["turbulanceLight"].speed        = 1.2f;
     base.GetComponent <Animation>()["camShakePlane"].wrapMode       = WrapMode.Loop;
     base.GetComponent <Animation>()["camShakePlane"].speed          = 2.4f;
     base.GetComponent <Animation>()["camShakePlaneStart"].wrapMode  = WrapMode.Once;
     base.GetComponent <Animation>()["camShakePlaneStart"].speed     = 1.7f;
     base.GetComponent <Animation>()["camShakePlaneGround"].wrapMode = WrapMode.Loop;
     base.GetComponent <Animation>()["camShakePlaneGround"].speed    = 3.5f;
     base.GetComponent <Animation>()["noShake"].wrapMode             = WrapMode.Loop;
     base.GetComponent <Animation>()["camShakeFall"].wrapMode        = WrapMode.Loop;
     base.GetComponent <Animation>()["camShakeFall"].speed           = 2.5f;
     base.GetComponent <Animation>()["turbulanceLight"].layer        = 1;
     base.GetComponent <Animation>()["camShakePlaneGround"].layer    = 1;
     base.GetComponent <Animation>()["camShakePlane"].layer          = 1;
     base.GetComponent <Animation>()["noShake"].layer      = 1;
     base.GetComponent <Animation>()["camShakeFall"].layer = 1;
     this.setup  = base.transform.root.GetComponentInChildren <playerScriptSetup>();
     this.thisTr = base.transform;
     this.mouse1 = base.GetComponentInChildren <SimpleMouseRotator>();
     this.mouse2 = base.transform.root.GetComponent <SimpleMouseRotator>();
     this.camTr  = this.mouse1.transform;
 }
Esempio n. 8
0
 private void Awake()
 {
     base.GetComponent<Animation>()["turbulanceLight"].wrapMode = WrapMode.Loop;
     base.GetComponent<Animation>()["turbulanceLight"].speed = 1.2f;
     base.GetComponent<Animation>()["camShakePlane"].wrapMode = WrapMode.Loop;
     base.GetComponent<Animation>()["camShakePlane"].speed = 2.4f;
     base.GetComponent<Animation>()["camShakePlaneStart"].wrapMode = WrapMode.Once;
     base.GetComponent<Animation>()["camShakePlaneStart"].speed = 1.7f;
     base.GetComponent<Animation>()["camShakePlaneGround"].wrapMode = WrapMode.Loop;
     base.GetComponent<Animation>()["camShakePlaneGround"].speed = 3.5f;
     base.GetComponent<Animation>()["noShake"].wrapMode = WrapMode.Loop;
     base.GetComponent<Animation>()["camShakeFall"].wrapMode = WrapMode.Loop;
     base.GetComponent<Animation>()["camShakeFall"].speed = 2.5f;
     base.GetComponent<Animation>()["turbulanceLight"].layer = 1;
     base.GetComponent<Animation>()["camShakePlaneGround"].layer = 1;
     base.GetComponent<Animation>()["camShakePlane"].layer = 1;
     base.GetComponent<Animation>()["noShake"].layer = 1;
     base.GetComponent<Animation>()["camShakeFall"].layer = 1;
     this.setup = base.transform.root.GetComponentInChildren<playerScriptSetup>();
     this.thisTr = base.transform;
     this.mouse1 = base.GetComponentInChildren<SimpleMouseRotator>();
     this.mouse2 = base.transform.root.GetComponent<SimpleMouseRotator>();
     this.camTr = this.mouse1.transform;
 }