Ejemplo n.º 1
0
    protected void ParseIUnitInfo()
    {
        gameObject.name = _unit.GetTitle() + "-by-" + ownerId;
        _health         = _unit.GetHealth();
        _isDead         = false;
        _transform      = transform;

        Debug.Log(_unit.GetTitle());
        if (_unit.GetTitle() == "Dreadnought")
        {
            _direction = Vector3.zero;
        }
    }
Ejemplo n.º 2
0
        public void SetValues(IUnitInfo info)
        {
            if (_transform == null)
            {
                Initialize();
            }

            _spawnID            = info.GetIndex();
            ShipImage.sprite    = info.GetBlueIcon();
            ShipEnergyCost.text = info.GetEnergyCost().ToString();

            ShipName.text = $"{info.GetTitle()[0]}<size=7>{info.GetTitle().Remove(0,1)}</size>";

            _rTransform.anchoredPosition = _defaultPosition;

            _selfImage.color = _srcColor;
            ShipImage.gameObject.SetActive(true);
            ShipEnergyCost.gameObject.SetActive(true);
            ShipName.gameObject.SetActive(true);

            IsEmpty = false;
        }