Beispiel #1
0
    public void SetState(EBossBallState state)
    {
        _state = state;

        if (_state == EBossBallState.Beaten)
        {
            _image.color = Color.green;
        }
        else
        {
            _image.color = Color.red;
        }
    }
Beispiel #2
0
    public Sprite GetBossBallSprite(EBoss type, EBossBallState spriteType)
    {
        switch (spriteType)
        {
        case EBossBallState.Available:
            if (BossTypeToBossBallAvailableSpriteDictionary.ContainsKey(type))
            {
                return(BossTypeToBossBallAvailableSpriteDictionary[type]);
            }
            break;

        case EBossBallState.Beaten:
            if (BossTypeToBossBallBeatenSpriteDictionary.ContainsKey(type))
            {
                return(BossTypeToBossBallBeatenSpriteDictionary[type]);
            }
            break;

        default:
            return(BossBallUnknownSprite);
        }

        return(BossBallUnknownSprite);
    }
Beispiel #3
0
 public void SetState(EBossBallState state)
 {
     _state       = state;
     Image.sprite = _bossStore.GetBossBallSprite(BossType, _state);
 }