Exemplo n.º 1
0
 /// <summary>
 /// Gem bonus state change processing
 /// </summary>
 /// <param name="gemBonus">Who executing</param>
 /// <param name="currentState">Current state</param>
 private void BonusOnChangeGemBonusState(GemBonusBase gemBonus, GemBonusState currentState)
 {
     if (currentState == GemBonusState.Finish)
     {
         gemBonus.ChangeGemBonusState -= BonusOnChangeGemBonusState;
         RemoveBonuses.Add(gemBonus);
     }
 }
Exemplo n.º 2
0
 protected GemBonusBase(Board board, Texture2D texture2D, Rectangle gemBox, int xPosition, int yPosition)
 {
     Board     = board;
     Texture2D = texture2D;
     ChangePosition(gemBox);
     Box.Width  = (int)(gemBox.Width * 0.5);
     Box.Height = (int)(gemBox.Height * 0.5);
     XPosition  = xPosition;
     YPosition  = yPosition;
     State      = GemBonusState.Idle;
 }
Exemplo n.º 3
0
 protected virtual void OnChangeGemBonusState(GemBonusBase gemBonus, GemBonusState currentState)
 {
     ChangeGemBonusState?.Invoke(gemBonus, currentState);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Change of state
 /// </summary>
 /// <param name="state">State</param>
 protected void ChangeState(GemBonusState state)
 {
     State = state;
     OnChangeGemBonusState(this, State);
 }