Beispiel #1
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
     indicator = GetComponent <UIIndicator>();
 }
        public void PlaceIndicators(FDRange range)
        {
            ClearCancellableObjects();

            foreach (FDPosition pos in range.Positions)
            {
                // Put indicator on the position
                GameObject obj = new GameObject();
                obj.transform.parent = fieldObjectsRoot;

                UIIndicator indicator = obj.AddComponent <UIIndicator>();
                indicator.Initialize(this, pos);

                cancellableObjects.Add(obj);
            }
        }
Beispiel #3
0
 private void Start()
 {
     indicator = Player.Instance.indicator;
 }