// Update is called once per frame public override void Update() { var xAxis = movingDisabled ? 0 : Input.GetAxisRaw(ActivePlayerData.Horizontal(activePlayer)); var yAxis = movingDisabled ? 0 : Input.GetAxisRaw(ActivePlayerData.Vertical(activePlayer)); animator.SetBool("moving", Mathf.Abs(xAxis) + Mathf.Abs(yAxis) > 0); characterMesh.LookAt(transform.localPosition + new Vector3(xAxis, 0f, yAxis).normalized); SetVelocity(new Vector3(xAxis, 0f, yAxis).normalized *currentMovementSpeed); UpdateGravity(); MoveCharacter(); }
void Update() { if (Input.GetButtonDown(ActivePlayerData.Fire(activePlayer))) { this.closest = ClosestInRangeItem(); if (this.closest) { carryItem = closest is Pickup ? (Pickup)closest : carryItem; closest.Interact(this); } } if (Input.GetButtonUp(ActivePlayerData.Fire(activePlayer))) { if (this.closest) { this.closest.FinishInteract(this); } } }
public static float GetCurrentGold() { return(ActivePlayerData.GetCurrentGold()); }
public static int GetLevel() { return(ActivePlayerData.GetLevel()); }
public static string GetSummonerName() { return(ActivePlayerData.GetSummonerName()); }