Author Topic: [issue] wrong scripting?  (Read 10685 times)

gyd

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 87
    • View Profile
[issue] wrong scripting?
« on: January 10, 2016, 01:51:30 AM »
UIScrollView, in RestrictWithinBounds (bool instant, bool horizontal, bool vertical)

  1. SpringPanel.Begin(mPanel.gameObject, pos, 13f).strength = 8f;
  2.  

the SpringPanel.strength is always 8f.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: [issue] wrong scripting?
« Reply #1 on: January 11, 2016, 05:13:25 PM »
Why is this an issue?

gyd

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 87
    • View Profile
Re: [issue] wrong scripting?
« Reply #2 on: January 13, 2016, 04:49:42 AM »
hmm..
sorry the issue tag might mislead you,
i want know if the line's coding style has any purpose, or just a mirror mistake ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: [issue] wrong scripting?
« Reply #3 on: January 13, 2016, 07:25:05 PM »
Probably something leftover from ancient times. You can just change it to SpringPanel.Begin(mPanel.gameObject, pos, 8f); to have the same effect without the extra set, not that it had much of an effect. :)

gyd

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 87
    • View Profile
Re: [issue] wrong scripting?
« Reply #4 on: January 14, 2016, 01:18:28 PM »
ok thanks