Example #1
0
    public void InitShot(ShotParams shotParams)
    {
        this.shotParams = shotParams;
        this.SetColor(this.shotParams.GetColor());

        //effects
        if(shotParams.type == ShotTypes.BombShot)
        {
            //spriteRenderer.enabled = false;
            GameObject effect = Instantiate(effects[0]);
            effect.transform.position = transform.position;
            effect.transform.parent = transform;
        }
    }
Example #2
0
    public void InitShot(ShotParams shotParams)
    {
        this.shotParams = shotParams;
        this.SetColor(this.shotParams.GetColor());


        //effects
        if (shotParams.type == ShotTypes.BombShot)
        {
            //spriteRenderer.enabled = false;
            GameObject effect = Instantiate(effects[0]);
            effect.transform.position = transform.position;
            effect.transform.parent   = transform;
        }
    }