예제 #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);
     }
 }
예제 #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;
 }
예제 #3
0
 protected virtual void OnChangeGemBonusState(GemBonusBase gemBonus, GemBonusState currentState)
 {
     ChangeGemBonusState?.Invoke(gemBonus, currentState);
 }
예제 #4
0
 /// <summary>
 /// Change of state
 /// </summary>
 /// <param name="state">State</param>
 protected void ChangeState(GemBonusState state)
 {
     State = state;
     OnChangeGemBonusState(this, State);
 }