示例#1
0
    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);
    }
示例#2
0
 public void UpdateTab(int position)
 {
     infoTab.effectPos = position;
     infoTab.LoadTab(this);
 }