void Awake () { slot = NamedBehavior.GetOrCreateComponentByName<State>(gameObject, "slot"); drop = NamedBehavior.GetOrCreateComponentByName<Transition>(gameObject, "deposit"); remove = NamedBehavior.GetOrCreateComponentByName<Transition>(gameObject, "remove"); valid_positions = new Dictionary<GameObject, Vector3>(); score_data = new GameScores.BasketSingleScore(); score_data.id = rx_baskets.Count+1; rx_baskets.Add(this); }
public BasketSingleScore copy_from(BasketSingleScore that){ id = that.id; weight = that.weight; count = that.count; is_overflow = that.is_overflow; return this; }
public BasketIcon chain_score(BasketSingleScore _score){ score = _score; return this; }
GameObject create_icon(BasketSingleScore _score, GameSettings.WinCondition _win){ GameObject obj = GameObject.Instantiate(prefab); obj.GetComponent<BasketIcon>().chain_score(_score).chain_win(_win); obj.transform.SetParent(place_icons_here, false); return obj; }