public SteeringPipeline(KinematicData character) { this.Target = new KinematicData(); this.Character = character; this.DeadlockMovement = new DynamicWander { Character = this.Character, MaxAcceleration = 10.0f }; this.Targeters = new List <Targeter>(); this.Decomposers = new List <Decomposer>(); this.Constraints = new List <Constraint>(); }
public void SetReferenceVars() { PlayerReference pRef = GeneralVariables.playerRef; if (pRef != null) { pe = pRef.GetComponent <PlayerEffects>(); wm = pRef.wm; dm = pRef.dm; pm = pRef.GetComponent <PlayerMovement>(); ac = pRef.ac; acs = pRef.acs; } }
void Start() { tr = transform; PlayerReference pr = GeneralVariables.playerRef; dm = pr.dm; wm = pr.wm; ac = pr.ac; cb = pr.cb; mainCamTr = GeneralVariables.mainPlayerCamera.transform; useLabel = GeneralVariables.uiController.useGUI; useKeyString = cInput.GetText("Use", 1); }
void Awake() { tr = transform; acoTr = antiClipObj.transform; PlayerReference pr = GeneralVariables.playerRef; wm = pr.wm; pm = pr.GetComponent <PlayerMovement>(); dm = pr.dm; ac = pr.ac; switchRotX = dm.drawRot.x; switchRotY = -dm.drawRot.y; switchRotZ = dm.drawRot.z; }
public void InitializeVariables() { PlayerReference pr = GeneralVariables.playerRef; if (pr != null) { pm = pr.GetComponent <PlayerMovement>(); pl = pr.GetComponent <PlayerLook>(); dm = pr.dm; ia = pr.ia; ac = pr.ac; cb = pr.cb; initialized = true; } }
public void InitializeVariables() { PlayerReference pr = GeneralVariables.playerRef; if (pr != null) { dm = pr.dm; ac = pr.ac; } else { this.enabled = false; return; } defaultPos = reflexDot.localPosition; }
public void RunStart() { if (mpReferenceOnly) { return; } PlayerReference pr = GeneralVariables.playerRef; pl = pr.GetComponent <PlayerLook>(); pm = pr.GetComponent <PlayerMovement>(); wm = pr.wm; dm = pr.dm; ac = pr.ac; acs = pr.acs; tss = firePos.GetComponent <TimeScaleSound>(); UIController uiController = GeneralVariables.uiController; curAmmoDisplay = uiController.curAmmoDisplay; ammoLeftDisplay = uiController.ammoLeftDisplay; ammoBar = uiController.ammoBar; crosshair = uiController.crosshairs; if (muzzleLight != null) { muzzleBrightness = muzzleLight.intensity; } initializeTime = Time.time; PoolManager.Instance.Initialize(); gunVisuals = GetComponent <GunVisuals>(); shootImpulseGUI = 1f; reloadImpulseGUI = 1f; pa = GetComponent <PistolAnim>(); maxIndex = 2; SwitchFiringMethod(); flashlightOn = false; startCounting = false; fireCount = 0; asm = 1f; spreadReal = baseSpreadAmount; bsna = baseSpreadAmount; }
void Start() { GeneralVariables.player = gameObject; GeneralVariables.uiController.guiCamera.enabled = true; tr = transform; controller = GetComponent <CharacterController>(); tss = footsteps.footstepPos.GetComponent <TimeScaleSound>(); playerMeshAnim = animations.playerMesh.GetComponent <Animation>(); UIController uic = GeneralVariables.uiController; fadeSprite = uic.fadeFromBlack; uic.guiCamera.GetComponent <GUISway>().InitializeVariables(); PlayerReference pr = GetComponent <PlayerReference>(); pv = GetComponent <PlayerVitals>(); pl = GetComponent <PlayerLook>(); ia = pr.ia; wc = pr.wc; ac = pr.ac; wm = pr.wm; dm = pr.dm; defaultHeight = controller.height; defaultHeadPos = head.localPosition; defaultLegPos = animations.playerMesh.transform.localPosition + (Vector3.down * animations.meshOffset); normalLimit = Mathf.Cos(controller.slopeLimit * Mathf.Deg2Rad); curSpeed = movement.runSpeed; jumpTime = -0.25f; impactMod = 1f; fDmgSpeedMult = 1f; AntiHackSystem.ProtectFloat("runSpeed", movement.runSpeed); AntiHackSystem.ProtectFloat("sprintSpeed", movement.sprintSpeed); AntiHackSystem.ProtectFloat("crouchSpeed", movement.crouchSpeed); AntiHackSystem.ProtectFloat("walkSpeed", movement.walkSpeed); AntiHackSystem.ProtectFloat("jumpHeight", movement.jumpHeight); grounded = false; movement.crouchDetection.gameObject.SetActive(false); AudioSource.PlayClipAtPoint(initializeSound, footsteps.footstepPos.transform.position, 0.12f); StartCoroutine(FadeFromBlack()); }
void Start() { camTr = GeneralVariables.mainPlayerCamera.transform; isMeleeState = false; PlayerReference pr = GeneralVariables.playerRef; dm = pr.dm; acs = pr.acs; wm = pr.wm; UIController uic = GeneralVariables.uiController; nameLabel = uic.weaponName; ammoBar = uic.ammoBar; curAmmoLabel = uic.curAmmoDisplay; ammoLeftLabel = uic.ammoLeftDisplay; friendlyFire = NetworkingGeneral.friendlyFire; }
void Start() { PlayerReference pRef = GeneralVariables.playerRef; pm = GeneralVariables.player.GetComponent <PlayerMovement>(); wm = pRef.wm; dm = pRef.dm; pl = pm.GetComponent <PlayerLook>(); pv = pm.GetComponent <PlayerVitals>(); vc = GetComponent <VignettingC>(); wdof = GetComponent <WeaponDepthOfField>(); cb = pRef.cb; acs = pRef.acs; ia = pRef.ia; GetComponent <Camera>().fieldOfView = (float)GameSettings.settingsController.FOV; cachedTr.localPosition = Vector3.zero; lastUnAim = -0.25f; lastAim = -0.25f; lastShake = -100f; }
public void Initialize() { if (nadeList != null) { GrenadeDatabase.savedGrenadeList = nadeList; } PlayerReference playerRef = GeneralVariables.playerRef; wm = playerRef.wm; dm = playerRef.dm; gam = playerRef.gam; grenadeInventory[0] = AddGrenadeToInventory(gam.grenadeTypeOne); grenadeInventory[1] = AddGrenadeToInventory(gam.grenadeTypeTwo); CheckGrenades(); curGrenade = availableGrenades[0]; curGrenade.OnSelect(); canSwitch = true; gameObject.SetActive(false); }
public MovementWithWeight(DynamicMovement.DynamicMovement movement, float weight) { this.Movement = movement; this.Weight = weight; }
public MovementWithWeight(DynamicMovement.DynamicMovement movement) { this.Movement = movement; this.Weight = 1.0f; }
void Start() { player = GeneralVariables.player; dm = GetComponent <DynamicMovement>(); pm = player.GetComponent <PlayerMovement>(); pv = player.GetComponent <PlayerVitals>(); pl = player.GetComponent <PlayerLook>(); pe = player.GetComponent <PlayerEffects>(); gam = GeneralVariables.playerRef.gam; ac = GeneralVariables.playerRef.ac; acs = GeneralVariables.playerRef.acs; UIController uiController = GeneralVariables.uiController; curAmmoDisplay = uiController.curAmmoDisplay; ammoLeftDisplay = uiController.ammoLeftDisplay; weaponName = uiController.weaponName; weaponIcon = uiController.weaponIcon; weaponSlot = uiController.weaponSlot; ammoBar = uiController.ammoBar; muzGlow = uiController.muzzleHelmetGlow; fireModeDisplay = uiController.fireModeLabel; reloadIndImpulse = uiController.reloadIndicatorLabel.GetComponent <ImpulseGUI>(); grenadeSelection = uiController.grenadeSelectionSprite; grenadeSelectionLabel = uiController.grenadeSelectionLabel; defaultIconPos = new Vector3(-172f, 14f, 2f); grenadeSelectionLabel.alpha = 0.2f; grenadeSelection.transform.localPosition = new Vector3(-35f, 83f, 0f); grenadeManager.gameObject.SetActive(true); grenadeManager.Initialize(); queuedAmmo = -1; queuedReserve = -1; queuedChamber = false; curWeaponNum = -1; if (mpSpawnStartPrimary > -1) { AddWeapon(mpSpawnStartPrimary, false); mpSpawnStartPrimary = -1; } else if (startingPrimary > -1) { AddWeapon(startingPrimary, false); } if (mpSpawnStartSecondary > -1) { AddWeapon(mpSpawnStartSecondary, false); mpSpawnStartSecondary = -1; } else if (startingSecondary > -1) { AddWeapon(startingSecondary, false); } if (Topan.Network.isConnected) { StartCoroutine(WaitForNetworkInit()); } else { FindWeaponToUse(true, 0); } dca = 0f; dal = 0f; displayCurAmmo = 0; displayAmmoLeft = 0; friendlyFire = NetworkingGeneral.friendlyFire; initTime = Time.time; }