void Awake() { Instance = this; GameObject uiobj = GameObject.Find("UI"); firstObjectView = uiobj.transform.FindChild("Canvas").FindChild("FirstObjectView").GetComponent <ObjectView>(); _userInputActionController = new UserInputActionController(); AttachObject(HasActionObjectManager.Instance.playerManager.getMyPlayer().GetComponent <GOPlayerController>()); }
// protected virtual void Awake() // { // _movableController = GetComponent<MovableController>(); // _baseAttribute = GetComponent<BaseAttributes>(); // _world = World.world; // _objectView = transform.FindChild("ObjectView").GetComponent<ObjectView>(); // _beAttackCheck = new BeAttackCheck(0.5f); // IsRead = false; // } // protected virtual void Start(){ // InitState(); // IsRead = true; // } public void InitControllerInfo() { _baseAttribute = GetComponent <BaseAttributes>(); _objectView = transform.FindChild("ObjectView").GetComponent <ObjectView>(); _beAttackCheck = new BeAttackCheck(0.5f); ResetPos(); InitState(); InitActionController(); InitMovableController(); InitOtherInfo(); inited = true; }
public void AttachObject(GOPlayerController controller) { _curAttachController = controller; WallOfAirManager.Instance.RegisterMovedWallOfAir(_curAttachController.transform, 256, new Vector3(Chunk.chunkWidth, 1, Chunk.chunkDepth)); thirdObjectView = controller.objectView; CameraManager.Instance.SetPlayer(controller.transform); UseFirstPersonView(); _userInputActionController.BinderGameObjectController(controller); if (MTB_Minimap.Instance != null) { MTB_Minimap.Instance.SetTarget(CurAttachController.gameObject); } }
public override void ChangeObjectView(ObjectView objectView) { base.ChangeObjectView(objectView); _goActionController.BindAnimatorController(this.objectView.animatorController); this.objectView.handMountPointController.ChangeHandObj(playerAttribute.handMaterialId, CameraManager.Instance.CurCamera.CameraType == MTBCameraType.First ? true: false); }
public virtual void ChangeObjectView(ObjectView objectView) { HideAvatar(); _objectView = objectView; ShowAvatar(); }