SceneryPropFromBottomScreenEdge.cs 466 B

1234567891011121314
  1. using UnityEngine;
  2. using System.Collections;
  3. /// <summary>
  4. /// Scenery prop which will be flush on the bottom edge of the screen on all devices
  5. /// </summary>
  6. public class SceneryPropFromBottomScreenEdge : SceneryProp
  7. {
  8. protected override void OnSpawnMsg()
  9. {
  10. base.OnSpawnMsg();
  11. _transform.GetComponent<RectTransform>().anchoredPosition = _transform.GetComponent<RectTransform>().anchoredPosition + new Vector2(0f, -(float)(GameConstants.GAME_HEIGHT/2));
  12. }
  13. }