23 lines
623 B
C#
23 lines
623 B
C#
|
|
using System.Collections.Generic;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
public class SetBannerPos : MonoBehaviour
|
||
|
|
{
|
||
|
|
static List<SetBannerPos> list_SetBannerPos = new List<SetBannerPos>();
|
||
|
|
|
||
|
|
private void Awake()
|
||
|
|
{
|
||
|
|
list_SetBannerPos.Add(this);
|
||
|
|
}
|
||
|
|
|
||
|
|
public bool BannerPosIsBottom = true;
|
||
|
|
|
||
|
|
private void Start()
|
||
|
|
{
|
||
|
|
var rt = GetComponent<RectTransform>();
|
||
|
|
if (BannerPosIsBottom)
|
||
|
|
rt.anchoredPosition = new Vector2(rt.anchoredPosition.x, rt.anchoredPosition.y + 150f);
|
||
|
|
else
|
||
|
|
rt.anchoredPosition = new Vector2(rt.anchoredPosition.x, rt.anchoredPosition.y - 150f);
|
||
|
|
}
|
||
|
|
}
|