public void CreateEffect(Unit.Action _action) { InfoTab tempTab = Instantiate(infoTabPrefab, transform).GetComponent <InfoTab>(); tempTab.affliation = affliation; if (affliation == GameManager.Affliation.DEFENCE) { tempTab.transform.localPosition = new Vector3(0, 0.5f, -0.4f); } else { tempTab.transform.localPosition = new Vector3(0, -0.5f, -0.4f); } Effect tempEffect = new Effect { actionType = _action.actionType, value = _action.value, immune = _action.immune, infoTab = tempTab, affliation = _action.affliation }; tempTab.LoadTab(tempEffect); effects.Add(tempEffect); }
public void UpdateTab(int position) { infoTab.effectPos = position; infoTab.LoadTab(this); }