public BGMManagement() { InitializeComponent(); _BGMProperties = new BGMProperties(); _SortMusic = new SortMusic(); _CharacterRotation = new CharacterRotation(); }
void Start() { cam = Camera.main; character2D = PlayerManager.player.GetComponent <PlatformerCharacter2D>(); shooting = PlayerManager.shooting; rotation = PlayerManager.rotation; }
public void Rotate(CharacterRotation characterRotation) { if (this.characterRotation != characterRotation) { int rotationDegree = ((int)this.characterRotation - (int)characterRotation) * 90; this.characterRotation = characterRotation; gameObject.transform.Rotate(0, 0, rotationDegree); } }
/// <summary> /// 重置拖动信息 /// </summary> private void ResetDragable() { CharacterRotation component = GetComponent <CharacterRotation>(); if (component) { component.target = ModelArray != null ? ModelBox : null; component.normalAngle = 0; component.ResetAngle(); } }
/// <summary> /// 检查旋转组件 /// </summary> private void CheckCharacterRotationComponent() { CharacterRotation component = GetComponent <CharacterRotation>(); if (component != null) { component.target = m_ModelRoot != null ? m_ModelRoot.transform : null; component.normalAngle = GetBaseRotation().y; component.ResetAngle(); } }
private Quaternion serverLastPredRotation; //CLIENT SIDE last predicted rot from server void Start() { inputStates = new Queue <CharacterInput.InputState>(); cameraMouseAim = Camera.main.GetComponent <CameraMouseAim>(); cameraAimPoint = Camera.main.GetComponent <CameraAimPoint>(); characterInput = GetComponent <CharacterInput>(); characterMovement = GetComponent <CharacterMovement>(); characterRotation = GetComponent <CharacterRotation>(); }
void Awake() { player = playerReference; stats = player.GetComponent <CharacterStats>(); equipment = player.GetComponent <Equipment>(); inventory = player.GetComponent <Inventory>(); shooting = player.GetComponentInChildren <WeaponShooting>(); rotation = player.GetComponentInChildren <CharacterRotation>(); DisableAI(); SetTags(); SetCamera(); }
void Awake() { _characterData = GetComponent <CharacterData>(); _characterMovement = GetComponent <CharacterMovement>(); _characterRotation = GetComponent <CharacterRotation>(); _characterAttack = GetComponent <CharacterAttack>(); _characterAnimCtrl = GetComponent <CharacterAnimationController>(); _characterLauncher = GetComponent <CharacterLaunchProjectile>(); _isPlayer = gameObject.CompareTag("Player"); if (_isPlayer) { _playerInput = GetComponent <PlayerInput>(); } }
public override void Initialize() { m_CfgEternityProxy = (CfgEternityProxy)Facade.RetrieveProxy(ProxyName.CfgEternityProxy); m_ServerListProxy = (ServerListProxy)Facade.RetrieveProxy(ProxyName.ServerListProxy); m_ModelImage = FindComponent <RawImage>("Back/Model_Character"); m_Animator = FindComponent <Animator>("Character_Layerbenfen/Camera"); m_Camera = FindComponent <Camera>("Character_Layerbenfen/Camera"); m_CharacterRoot = FindComponent <Transform>("Character_Layerbenfen/CharacterRoot/Character"); m_RotationContoller = FindComponent <CharacterRotation>("DragableBack"); m_RotationContoller.normalAngle = m_CharacterRoot.localEulerAngles.y; m_SceneRoot = FindComponent <Transform>("Character_Layerbenfen"); m_PostProcessVolume = FindComponent <PostProcessVolume>("Character_Layerbenfen/Post"); CanReceiveFocus = false; }
void Start() { inputStates = new Queue<CharacterInput.InputState>(); cameraMouseAim = Camera.main.GetComponent<CameraMouseAim>(); cameraAimPoint = Camera.main.GetComponent<CameraAimPoint>(); characterInput = GetComponent<CharacterInput>(); characterMovement = GetComponent<CharacterMovement>(); characterRotation = GetComponent<CharacterRotation>(); }
public void Run(CharacterRotation rotate) { Rotate(rotate); isRunning = true; }