Beispiel #1
0
    public override void endOfTurnAction()
    {
        DZAttributes dropzoneAttributes = GameObject.FindWithTag(dropzone.tag).GetComponent <DZAttributes>();

        dropzoneAttributes.changeHealth(this.value, true);
        this.value -= 1;
        if (this.value < 1)
        {
            Destroy(this);
        }
    }
Beispiel #2
0
    public override void DoAction(GameObject dropzone)
    {
        DZAttributes dropzoneAttributes = GameObject.FindWithTag(dropzone.tag).GetComponent <DZAttributes>();

        dropzoneAttributes.changeHealth(this.value, this.isOffensive);

        var        buff  = Resources.Load("Buffs/Bleed") as GameObject;
        GameObject bleed = Instantiate(buff, new Vector3(0, 0, 0), Quaternion.identity);

        // TODO -- Find BuffBar gameobjected og sæt den til at være parent til bleed --
        // TODO -- I stedet for at buge isoffensive, så lav et tag til attack, defence og utility cards --

        var parent = dropzoneAttributes.GetChildComponentByName <UnityEngine.UI.Image>("Buffbar");

        Debug.Log("load parent " + parent.ToString());

        bleed.transform.SetParent(parent.transform, false);

        dropzoneAttributes.buffs.Add(bleed);
    }
Beispiel #3
0
    public override void DoAction(GameObject dropzone)
    {
        DZAttributes dropzoneAttributes = GameObject.FindWithTag(dropzone.tag).GetComponent <DZAttributes>();

        dropzoneAttributes.AddArmor(this.value);
    }