public WeaponFire(GameObject camera, CharacterType belongSoldierType, float moveUp, float moveLeft, float moveRight, float horizontalRevert, float verticalRevert, int hpCut) { this.camera = camera; this.moveUp = moveUp; this.moveLeft = moveLeft; this.moveRight = moveRight; this.horizontalRevert = horizontalRevert; this.verticalRevert = verticalRevert; this.hpCut = hpCut; this.belongSoldierType = belongSoldierType; if (this.camera == null) { this.camera = GameObject.Find(GameObjectName.MainCameraName); } cameraController = this.camera.GetComponent <TPSCameraController>(); MonoMgr.Instance.AddUpdateEvent(Update); }
// Start is called before the first frame update void Start() { characterController = characterController.GetComponent <TPSCharacterController>(); cameraController = cameraController.GetComponent <TPSCameraController>(); activateObj = activateObj.GetComponent <ActivateLookedAtObjects>(); sentences = new Queue <string>(); }
protected override void Awake() { ninstance = this; base.Awake(); SetCameraOffset(TPSOffset); m_SelfRotation = true; SetCameraYawClamp(I_PitchMin, I_PitchMax); }
public override void OnTakeControl(TPSCameraController _controller) { base.OnTakeControl(_controller); _controller.m_BindRoot = m_CameraAttach; _controller.m_BindPosOffset = new Vector3(0, .5f, -4f); _controller.m_MoveDamping = .2f; _controller.m_RotateDamping = .2f; }
private void Awake() { m_CameraController = transform.Find("CameraController").GetComponent <TPSCameraController>(); Rigidbody[] rigidbodies = transform.Find("Dynamic").GetComponentsInChildren <Rigidbody>(); m_DynamicItems = new DynamicItemRepositon[rigidbodies.Length]; for (int i = 0; i < rigidbodies.Length; i++) { m_DynamicItems[i] = new DynamicItemRepositon(rigidbodies[i]); } }
public override void OnTakeControl(TPSCameraController _controller) { base.OnTakeControl(_controller); PCInputManager.Instance.GetKeyBinding(enum_Binding.Jump).Add(OnLostConcious); PCInputManager.Instance.GetKeyBinding(enum_Binding.Sprint).Add(OnSprint); PCInputManager.Instance.GetKeyBinding(enum_Binding.MainFire).Add(m_LeftArmCombine.OnAiming); PCInputManager.Instance.GetKeyBinding(enum_Binding.AltFire).Add(m_RightArmCombine.OnAiming); m_LeftThigh.maxAngularVelocity = 90f; m_RightThigh.maxAngularVelocity = 90f; }
public override void OnTakeControl(TPSCameraController _controller) { base.OnTakeControl(_controller); _controller.m_BindRoot = m_Head; _controller.m_BindPosOffset = Vector3.zero; _controller.m_MoveDamping = 0f; _controller.m_RotateDamping = 0f; PCInputManager.Instance.GetKeyBinding(enum_Binding.AltFire).Add(OnAltFire); PCInputManager.Instance.GetKeyBinding(enum_Binding.MainFire).Add(OnMainFire); PCInputManager.Instance.GetKeyBinding(enum_Binding.Jump).Add(OnJump); PCInputManager.Instance.GetKeyBinding(enum_Binding.Sprint).Add(OnSprint); m_GravityLine = m_GravityPoint.GetComponent <LineRenderer>(); }
public virtual void OnTakeControl(TPSCameraController _controller) { TouchInputManager.Instance.SwitchToTrackers().Init(new TouchTracker_Joystick(UIT_TouchConsole.GetHelperJoystick(), enum_Option_JoyStickMode.Retarget, OnMove, TouchTracker.s_LeftTrack), new TouchTracker(OnRotate, TouchTracker.s_RightTrack)); }
public override void OnTakeControl(TPSCameraController _controller) { base.OnTakeControl(_controller); }
public override void OnTakeControl(TPSCameraController _controller) { base.OnTakeControl(_controller); PCInputManager.Instance.GetKeyBinding(enum_Binding.Jump).Add(SwitchAnim); }