Ejemplo n.º 1
0
    //If AI fighter Can give any power then we call this function
    public void SpawnPowerUpAt(GameObject atObj, ePowerUpType powerUpType)
    {
        GameObject effectToLoad = null;

        switch (powerUpType)
        {
        case ePowerUpType.shield:
            effectToLoad = shieldPrefab;
            break;
        }
        if (effectToLoad)
        {
            GameObject newPower = Instantiate(effectToLoad);
            newPower.transform.position = atObj.transform.position;
            newPower.gameObject.SetActive(true);
        }
    }
    private void SetupPowerUp(ePowerUpType _type)
    {
        PowerUpType = _type;

        WideSprite.SetActive(false);
        ThinSprite.SetActive(false);
        GunSprite.SetActive(false);
        ExtraLifeSprite.SetActive(false);

        switch (PowerUpType)
        {
        case ePowerUpType.Wide: WideSprite.SetActive(true);
            break;

        case ePowerUpType.Thin: ThinSprite.SetActive(true);
            break;

        case ePowerUpType.Gun: GunSprite.SetActive(true);
            break;

        case ePowerUpType.ExtraLife: ExtraLifeSprite.SetActive(true);
            break;
        }
    }
Ejemplo n.º 3
0
 public static staticObject Create(Point pos, ePowerUpType powUpTyp)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 4
0
 public static staticObject Create(Point pos, ePowerUpType powUpTyp)
 {
     throw new NotImplementedException();
 }