Ejemplo n.º 1
0
 void Awake()
 {
     targetedEnemies = new List <GameObject>();
     myCollider      = GetComponent <CircleCollider2D>();
     trickster       = GetComponent <characterAttributes>();
     firePoint       = rangeAttackFirepoint.position;
 }
Ejemplo n.º 2
0
    public void Reset()
    {
        this.deployBar        = this.GetComponent <Image>();
        this.background       = this.transform.parent.gameObject.GetComponent <Image>();
        this.character        = this.transform.parent.parent.parent.gameObject.GetComponent <characterAttributes>();
        this.deployBar.color  = new Color(this.deployBar.color.r, this.deployBar.color.g, this.deployBar.color.b, 1f);
        this.background.color = new Color(this.background.color.r, this.background.color.g, this.background.color.b, 1f);

        this.current = 0;
        this.max     = this.DEFAULT_DEPLOY_TIME / (this.character.MOB * .5f);
    }
Ejemplo n.º 3
0
 void Awake()
 {
     attack    = GetComponent <characterAttack>();
     character = GetComponent <characterAttributes>();
     ability   = GetComponent <characterAbilities>();
 }
Ejemplo n.º 4
0
 /// <summary>
 ///     This method should be called with associated character attribute components when the
 ///     bullet object is instantiated.
 /// </summary>
 /// <param name="characterAttributes">
 ///     The character attributes.
 /// </param>
 public void SetCharacterAttribute(characterAttributes characterAttributes)
 {
     this.attributes = characterAttributes;
     this.Source     = characterAttributes.gameObject;
 }
Ejemplo n.º 5
0
    public void UpdatePanel()
    {
        // Show the attributes
        characterAttributes characterAttributes = GameObject.Find("CharacterList").transform
                                                  .GetChild(this.characterIndex).gameObject.GetComponent <characterAttributes>();

        this.attributes[0].GetComponent <Image>().sprite = this.bars[characterAttributes.POW];
        this.attributes[1].GetComponent <Image>().sprite = this.bars[characterAttributes.ROF];
        this.attributes[2].GetComponent <Image>().sprite = this.bars[characterAttributes.RNG];
        this.attributes[3].GetComponent <Image>().sprite = this.bars[characterAttributes.MOB];
        this.attributes[4].GetComponent <Image>().sprite = this.bars[characterAttributes.AMP];

        // Show the equipped modules
        for (int i = 0; i < 5; i++)
        {
            if (this.inventory[this.characterIndex].transform.GetChild(i).childCount != 0)
            {
                if (this.slots[i].transform.childCount == 0)
                {
                    GameObject.Instantiate(
                        this.inventory[this.characterIndex].transform.GetChild(i).GetChild(0),
                        this.slots[i].transform);
                    this.slots[i].transform.GetChild(0).GetComponent <CanvasGroup>().blocksRaycasts = true;
                    this.slots[i].transform.GetChild(0).GetComponent <ModuleGeneric>().isDragable   = false;
                }
            }
            else
            {
                if (this.slots[i].transform.childCount != 0)
                {
                    Destroy(this.slots[i].transform.GetChild(0).gameObject);
                }
            }
        }

        // Show enabled AE and SE
        if (characterAttributes.burstAE)
        {
            this.AE[0].color = new Color(1.0f, 0.0f, 1.0f);
        }
        else
        {
            this.AE[0].color = new Color(0.25f, 0.25f, 0.25f);
        }

        if (characterAttributes.ricochetAE)
        {
            this.AE[1].color = new Color(1.0f, 0.0f, 1.0f);
        }
        else
        {
            this.AE[1].color = new Color(0.25f, 0.25f, 0.25f);
        }

        if (characterAttributes.laserAE)
        {
            this.AE[2].color = new Color(1.0f, 0.0f, 1.0f);
        }
        else
        {
            this.AE[2].color = new Color(0.25f, 0.25f, 0.25f);
        }

        if (characterAttributes.splashAE)
        {
            this.AE[3].color = new Color(1.0f, 0.0f, 1.0f);
        }
        else
        {
            this.AE[3].color = new Color(0.25f, 0.25f, 0.25f);
        }

        if (characterAttributes.pierceAE)
        {
            this.AE[4].color = new Color(1.0f, 0.0f, 1.0f);
        }
        else
        {
            this.AE[4].color = new Color(0.25f, 0.25f, 0.25f);
        }

        if (characterAttributes.traceAE)
        {
            this.AE[5].color = new Color(1.0f, 0.0f, 1.0f);
        }
        else
        {
            this.AE[5].color = new Color(0.25f, 0.25f, 0.25f);
        }

        if (characterAttributes.whirwindAE)
        {
            this.AE[6].color = new Color(1.0f, 0.0f, 1.0f);
        }
        else
        {
            this.AE[6].color = new Color(0.25f, 0.25f, 0.25f);
        }

        if (characterAttributes.reachAE)
        {
            this.AE[7].color = new Color(1.0f, 0.0f, 1.0f);
        }
        else
        {
            this.AE[7].color = new Color(0.25f, 0.25f, 0.25f);
        }

        if (characterAttributes.slowSE)
        {
            this.SE[0].color = new Color(1.0f, 0.0f, 1.0f);
        }
        else
        {
            this.SE[0].color = new Color(0.25f, 0.25f, 0.25f);
        }

        if (characterAttributes.stunSE)
        {
            this.SE[1].color = new Color(1.0f, 0.0f, 1.0f);
        }
        else
        {
            this.SE[1].color = new Color(0.25f, 0.25f, 0.25f);
        }

        if (characterAttributes.burnSE)
        {
            this.SE[2].color = new Color(1.0f, 0.0f, 1.0f);
        }
        else
        {
            this.SE[2].color = new Color(0.25f, 0.25f, 0.25f);
        }

        if (characterAttributes.markSE)
        {
            this.SE[3].color = new Color(1.0f, 0.0f, 1.0f);
        }
        else
        {
            this.SE[3].color = new Color(0.25f, 0.25f, 0.25f);
        }

        if (characterAttributes.purgeSE)
        {
            this.SE[4].color = new Color(1.0f, 0.0f, 1.0f);
        }
        else
        {
            this.SE[4].color = new Color(0.25f, 0.25f, 0.25f);
        }

        if (characterAttributes.breakSE)
        {
            this.SE[5].color = new Color(1.0f, 0.0f, 1.0f);
        }
        else
        {
            this.SE[5].color = new Color(0.25f, 0.25f, 0.25f);
        }

        if (characterAttributes.blightSE)
        {
            this.SE[6].color = new Color(1.0f, 0.0f, 1.0f);
        }
        else
        {
            this.SE[6].color = new Color(0.25f, 0.25f, 0.25f);
        }

        if (characterAttributes.netSE)
        {
            this.SE[7].color = new Color(1.0f, 0.0f, 1.0f);
        }
        else
        {
            this.SE[7].color = new Color(0.25f, 0.25f, 0.25f);
        }
    }