Ejemplo n.º 1
0
    public void ConstructorMainBase()
    {
        this.uiData = this.GetComponent <PlataformUIData>();

        SetLife(BASE_MAX_LIFE);
        this.uiData.SetViewActive(true);
    }
Ejemplo n.º 2
0
    public void Constructor(int id, string name, PlataformUIData uiData, GameObject prefabExplotion)
    {
        this.Id   = id;
        this.Name = name;

        this.prefabExplotion = prefabExplotion;
        this.uiData          = uiData;

        SetLife(MAX_LIFE);
        this.uiData.SetViewActive(true);
    }
Ejemplo n.º 3
0
    public void Constructor(int id, string name, PlataformUIData uiData, GameObject prefabExplotion)
    {
        this.Id   = id;
        this.Name = name;

        this.prefabExplotion = prefabExplotion;

        this.uiData = uiData;
        uiData.SetViewActive(true);

        switch (id)
        {
        case 1: MaxBullets = MAX_TURRET_BULLETS; MaxLife = MAX_TURRET_LIFE; break;

        case 2: MaxBullets = MAX_SHOTGUN_BULLETS; MaxLife = MAX_SHOTGUN_LIFE; break;

        case 3: MaxBullets = MAX_FLAMETHROWER_BULLETS; MaxLife = MAX_FLAMETHROWER_LIFE; break;
        }

        AddBullet(MaxBullets);
        AddLife(MaxLife);
        uiData.UpdateInformation(this.Life, this.Bullets, MaxLife, MaxBullets);
    }