Пример #1
0
    protected void CreateRound()
    {
        var round = trackers.Count > 0 ? trackers.Last().round + 1 : 0;

        var roundItem = AnimatedItem.CreateInstance <AnimatedItem>();

        roundItem.prefab        = roundPrefab;
        roundItem.calculateSize = true;
        roundItem.createOnInit  = true;
        base.Add(roundItem);
        ValueReceiver.SendValue(roundItem.item.gameObject, round);

        var units = Game.rounds.GetEstimatedOrder(round - Game.rounds.round);

        trackers.Add(new() {
            round = round,
            index = items.Count,
            units = units,
        });

        foreach (var unit in units)
        {
            var unitItem = AnimatedItem.CreateInstance <AnimatedItem>();
            unitItem.prefab        = unitPrefab;
            unitItem.calculateSize = true;
            unitItem.createOnInit  = true;
            base.Add(unitItem);
            ValueReceiver.SendValue(unitItem.item.gameObject, unit);
            ValueReceiver.SendValue(unitItem.item.gameObject, round);
        }
    }
Пример #2
0
 protected virtual void InitializeTooltip(Tooltip tooltip)
 {
     foreach (var data in additionalData)
     {
         ValueReceiver.SendValue(tooltip.gameObject, data);
     }
 }
Пример #3
0
 public void OnTurnStart(Unit unit)
 {
     ValueReceiver.SendValue(gameObject, unit);
 }
 private void InitializeTooltip(Tooltip tooltip)
 {
     ValueReceiver.SendValue(tooltip.gameObject, dataObject);
 }
Пример #5
0
 public void Propagate()
 {
     ValueReceiver.SendValue(gameObject, value);
 }