public void CallOnPinHasGottenBackUp(UBowlingPinComponent _pin) { if (OnPinHasGottenBackUp != null) { OnPinHasGottenBackUp(_pin); } }
public void CallOnPinHasFallen(UBowlingPinComponent _pin) { if (OnPinHasFallen != null) { OnPinHasFallen(_pin); } //if (OnPinHasFallenDelegate.IsBound) //{ // OnPinHasFallenDelegate.Invoke(_pin); //} }
void UpdatePinHasStandingDictionary(UBowlingPinComponent _pin, bool _fallen) { string _key = _pin.MyOwner.GetName(); if (AllPinsStandingDictionary.ContainsKey(_key)) { AllPinsStandingDictionary[_key] = !_fallen; int _pinStandingCount = 0; foreach (bool _pinStanding in AllPinsStandingDictionary.Values) { if (_pinStanding) { _pinStandingCount++; } } gamemaster.CallOnUpdatePinCount(_pinStandingCount); } }
void PinGottenBackUp(UBowlingPinComponent _pin) { UpdatePinHasStandingDictionary(_pin, false); }
void PinHasFallen(UBowlingPinComponent _pin) { UpdatePinHasStandingDictionary(_pin, true); }