void Start() { em = GameObject.FindGameObjectWithTag("GameManager").GetComponent <EditorModeController>(); mic = GameObject.FindGameObjectWithTag("GameManager").GetComponent <MouseInputController>(); zoomToPlayMode = false; myCamera = Camera.main; }
private void ToggleOff() { IconFront.SetSpriteSO(actionData.Sprites[0], Network: false); UIActionManager.Instance.ActiveAction = null; if (actionData.HasCustomCursor) { MouseInputController.ResetCursorTexture(); } }
void Start() { staminaIncreaseValue = 0.1f; notEnoughStamina = false; dashForce = 1000.0f; em = GameObject.FindGameObjectWithTag("GameManager").GetComponent <EditorModeController>(); mic = GameObject.FindGameObjectWithTag("GameManager").GetComponent <MouseInputController>(); tc = GameObject.FindGameObjectWithTag("GameManager").GetComponent <TutorialController>(); timeSinceLastAtack = Time.timeSinceLevelLoad; attackDamage = 8.0f; attackIntervalTime = 0.5f; }
private void TrySetCustomCursor() { if (actionData.HasCustomCursor == false) { return; } if (actionData.HasCustomCursorOffset) { MouseInputController.SetCursorTexture(actionData.CursorTexture, actionData.CursorOffset); } else { bool isCentered = actionData.OffsetType == CursorOffsetType.Centered; MouseInputController.SetCursorTexture(actionData.CursorTexture, isCentered); } }
private void RpcBeforeGhost() { //only need to clean up client side if we are controlling the body who is becoming a ghost //no more closet handler, they are dead ClosetPlayerHandler cph = GetComponent <ClosetPlayerHandler>(); if (cph != null) { Destroy(cph); } //no more input can be sent to the body. MouseInputController mouseInput = GetComponent <MouseInputController>(); if (mouseInput != null) { Destroy(mouseInput); } }
public void Init(Inventory inventory, float moveSpeed) { speed = moveSpeed; areaController = AreaController.instance; areaWidth = areaController.active_area.Width - 1; areaHeight = areaController.active_area.Height - 1; mouse_controller = MouseInputController.instance; mouse_controller.onRightClick += TryInteract; key_controller = KeyInputController.instance; key_controller.onKeyPressed += OnMove; key_controller.onKeyHeld += Move; key_controller.onKeyUp += OnMoveStop; key_controller.onInteractBttnPressed += TryInteract; SetAnimParams(0, 0); Camera_Controller.instance.SetTargetAndLock(this.transform, 0, areaWidth, 0, areaHeight); OnChangeArea(); heroInventory = inventory; radiation_tracker = new RadiationTracker(heroInventory); InventoryUI.instance.Init(heroInventory, radiation_tracker); move_x = transform.position.x; move_y = transform.position.y; GetComponent <HeroAttackController>().Init(); }
void OnEnable() { instance = this; }