void Update() { currentPosition = transform.position; currentPosition.x = thisObject.GetCurrentPosition().x; currentPosition.y = thisObject.GetCurrentPosition().y; transform.position = currentPosition; SetText(); }
private void Charge() { if (canUseSkill && !thisScript.buildingIsShortest) { thisScript.attackAnimIsPlaying = true; canUseSkill = false; isCharging = true; targetPosition = thisScript.GetCurrentPosition(); targetPosition.x += skillRange; thisScript.speed = skillMoveSpeed; thisScript.anim.Play("DashR"); thisScript.canSetSpeed = false; Invoke("SetCanUseSkill", skillDelay); } }