You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
428 B

7 years ago
  1. #pragma strict
  2. public var grumpy:Texture2D;
  3. private var grumpyRect:LTRect;
  4. function Start () {
  5. grumpyRect = new LTRect( -grumpy.width, 0.5*Screen.height - grumpy.height/2.0, grumpy.width, grumpy.height );
  6. // Slide in
  7. LeanTween.move(grumpyRect, new Vector2(0.5*Screen.width - grumpy.width/2.0, grumpyRect.rect.y ), 1.0).setEase(LeanTweenType.easeOutQuad);
  8. }
  9. function OnGUI(){
  10. GUI.DrawTexture( grumpyRect.rect, grumpy);
  11. }