public void initializeNewFeatures(Game_Controller.SpecialFeatureList newFeature, float counter)
    {
        int nIndex = (int)newFeature;

        features [nIndex].IsActive = true;
        features [nIndex].Counter  = counter;
        isHaveSuperPower           = true;

        if (Game_Controller.SpecialFeatureList.superShooter == newFeature)
        {
            bulletTransform.localScale = new Vector3(0.17f, 0.32f, 0.066f);
        }
        else if (Game_Controller.SpecialFeatureList.fasterShooter == newFeature)
        {
            speed = 9f;
        }
        else if (Game_Controller.SpecialFeatureList.ghostShooter == newFeature)
        {
            tDamageCounter = 0;
            shield.SetActive(true);
        }
        else if (Game_Controller.SpecialFeatureList.immortalShooter == newFeature)
        {
            shield.SetActive(true);
        }

        Game_Controller.instance.initializeSpecialFeature(newFeature, true);
    }
 public Special_Features(Game_Controller.SpecialFeatureList pFeature, float pCounter, float pLimit, bool pIsActive)
 {
     this.Feature  = pFeature;
     this.Counter  = pCounter;
     this.limit    = pLimit;
     this.isActive = pIsActive;
 }
Beispiel #3
0
    void initialize()
    {
        int rTemp = Random.Range(0, 5);

        spriteColor = new Color[5] {
            Color.red, Color.yellow, Color.blue, Color.red, Color.black
        };
        identityBall      = rTemp;
        spriteBall.color  = spriteColor [rTemp];
        spriteBall.sprite = Resources.Load <Sprite>("Sprites/tspec" + rTemp.ToString());

        feature = (Game_Controller.SpecialFeatureList)identityBall;
    }
Beispiel #4
0
 public void initializeSpecialFeature(Game_Controller.SpecialFeatureList featureID, bool status)
 {
     topCenter.transform.GetChild((int)featureID).gameObject.SetActive(status);
 }