Beispiel #1
0
    //sets the type of projectile based on weapon type
    public void SetType(Main.WeaponType eType)
    {
        _type = eType;
        WeaponDefintion def = Main.GetWeaponDefintion(_type);

        _rend.material.color = def.projectileColor;
    }
Beispiel #2
0
 // sets the weapon type based on the definition in the main
 public void SetType(Main.WeaponType wt)
 {
     _type = wt;
     this.gameObject.SetActive(true);
     def = Main.GetWeaponDefintion(_type);             // gets the defintion for the type of weapon
     _collarRend.material.color = def.projectileColor; // sets the collar to projectile colour
     lastShotTime = 0;                                 // set the last shot time to be 0 so that the weapon can be shot
 }
Beispiel #3
0
    public void SetType(Main.WeaponType wt)
    {
        // get weapon defintion from main
        WeaponDefintion def = Main.GetWeaponDefintion(wt);

        cubeRend.material.color = def.projectileColor; // set the colour
        type        = wt;                              // set the type
        letter.text = def.letter;                      // set the letter
    }