public bool SwordAvailable(SwordColor cor)
    {
        bool retorno = false;

        switch (cor)
        {
        case SwordColor.blue:
            retorno = EspadaAzul;
            break;

        case SwordColor.green:
            retorno = EspadaVerde;
            break;

        case SwordColor.gold:
            retorno = EspadaDourada;
            break;

        case SwordColor.red:
            retorno = EspadaVermelha;
            break;
        }

        return(retorno);
    }
    private void AdjustColor(GameObject usedObject, GameObject performer)
    {
        if (isActivated)
        {
            Chat.AddExamineMsgFromServer(performer, "You can't adjust the sword while it's <i>on</i>!");
            return;
        }

        if (color == SwordColor.Rainbow)
        {
            Chat.AddExamineMsgFromServer(performer, "It's <i>already</i> fabulous!");
            return;
        }

        if (Validations.HasItemTrait(usedObject, CommonTraits.Instance.Screwdriver))
        {
            color += 1;
            if (color > SwordColor.Purple)
            {
                color = SwordColor.Red;
            }

            Chat.AddExamineMsgFromServer(performer, "You adjust the crystalline beam emitter.");
        }
        else if (Validations.HasItemTrait(usedObject, CommonTraits.Instance.Multitool))
        {
            color = SwordColor.Rainbow;
            Chat.AddExamineMsgFromServer(performer,
                                         "You tinker with the sword's firmware using the multitool.\nIt reports; <b>RNBW_ENGAGE</b>.");
        }
    }
Exemple #3
0
 private void Start()
 {
     colorChange            = GetComponentInParent <ColorChange>();
     activeColor            = SwordColor.orange;
     orangeCollider.enabled = false;
     blueCollider.enabled   = false;
     //orangeSpriteRenderer.enabled = false;
     //blueSpriteRenderer.enabled = false;
 }
Exemple #4
0
 private void Awake()
 {
     itemAttributes = GetComponent <ItemAttributesV2>();
     lightControl   = GetComponent <ItemLightControl>();
     spriteHandler  = GetComponentInChildren <SpriteHandler>();
     if (color == SwordColor.Random)
     {
         // Get random color
         color = (SwordColor)Enum.GetValues(typeof(SwordColor)).GetValue(Random.Range(1, 5));
     }
 }
 private void Start()
 {
     offSize        = itemAttributes.Size;
     offHitSound    = itemAttributes.ServerHitSound;
     offHitDamage   = itemAttributes.ServerHitDamage;
     offThrowDamage = itemAttributes.ServerThrowDamage;
     offAttackVerbs = new List <string>(itemAttributes.ServerAttackVerbs);
     if (color == SwordColor.Random)
     {
         // Get random color
         color = (SwordColor)Enum.GetValues(typeof(SwordColor)).GetValue(Random.Range(1, 5));
     }
 }
Exemple #6
0
 public void ChangeWeaponColor()
 {
     AudioManager.instance.PlayChangeWeapon();
     if (activeColor == SwordColor.orange)
     {
         activeColor = SwordColor.blue;
         colorChange.ChangeToSecondColor();
     }
     else if (activeColor == SwordColor.blue)
     {
         activeColor = SwordColor.orange;
         colorChange.ChangeToOriginalColor();
     }
 }
    void Update()
    {
        if (currentNinjaColor != ninjaColor)
        {
            switch (ninjaColor)
            {
            case NinjaColor.Blue:
                ChangeTexture("Ninja_Mesh", ninjaTextures[0]);
                break;

            case NinjaColor.Green:
                ChangeTexture("Ninja_Mesh", ninjaTextures[1]);
                break;

            case NinjaColor.Red:
                ChangeTexture("Ninja_Mesh", ninjaTextures[2]);
                break;

            default:
                break;
            }
            currentNinjaColor = ninjaColor;
        }

        if (currentSwordColor != swordColor)
        {
            switch (swordColor)
            {
            case SwordColor.Blue:
                ChangeTexture("Scabbard_Mesh", swordTextures[0]);
                ChangeTexture("Sword_Mesh", swordTextures[0]);
                break;

            case SwordColor.Green:
                ChangeTexture("Scabbard_Mesh", swordTextures[1]);
                ChangeTexture("Sword_Mesh", swordTextures[1]);
                break;

            case SwordColor.Red:
                ChangeTexture("Scabbard_Mesh", swordTextures[2]);
                ChangeTexture("Sword_Mesh", swordTextures[2]);
                break;

            default:
                break;
            }
            currentSwordColor = swordColor;
        }
    }
    private Color GetLightSourceColor(SwordColor swordColor)
    {
        switch (swordColor)
        {
        case SwordColor.Red:
            return(new Color32(250, 130, 130, 255));                    // LIGHT_COLOR_RED

        case SwordColor.Blue:
            return(new Color32(64, 206, 255, 255));                    // LIGHT_COLOR_LIGHT_CYAN

        case SwordColor.Green:
            return(new Color32(100, 200, 100, 255));                    // LIGHT_COLOR_GREEN

        case SwordColor.Purple:
            return(new Color32(155, 81, 255, 255));                    // LIGHT_COLOR_LAVENDER
        }

        return(default);
    public void GetSword(SwordColor cor)
    {
        switch (cor)
        {
        case SwordColor.blue:
            EspadaAzul = true;
            break;

        case SwordColor.green:
            EspadaVerde = true;
            break;

        case SwordColor.gold:
            EspadaDourada = true;
            break;

        case SwordColor.red:
            EspadaVermelha = true;
            break;
        }
    }
    private ItemsSprites GetItemSprites(SwordColor swordColor)
    {
        switch (swordColor)
        {
        case SwordColor.Red:
            return(Sprites.Red);

        case SwordColor.Blue:
            return(Sprites.Blue);

        case SwordColor.Green:
            return(Sprites.Green);

        case SwordColor.Purple:
            return(Sprites.Purple);

        case SwordColor.Rainbow:
            return(Sprites.Rainbow);
        }

        return(Sprites.Off);
    }