public void SetState(EBossBallState state) { _state = state; if (_state == EBossBallState.Beaten) { _image.color = Color.green; } else { _image.color = Color.red; } }
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); }
public void SetState(EBossBallState state) { _state = state; Image.sprite = _bossStore.GetBossBallSprite(BossType, _state); }