Beispiel #1
0
    public static void RegisterBehaviour(IFrameUpdate behaviour)
    {
        if (!Access())
        {
            return;
        }
        string type_name = (behaviour as MonoBehaviour).GetType().Name;

        //Add type name
        if (!Instance.behaviours_names.Contains(type_name))
        {
            Instance.behaviours_names.Add(type_name);
        }

        Instance.frameupdate_behaviours.Add(behaviour);
    }
Beispiel #2
0
 public void UnregisterForFrameUpdates(IFrameUpdate item)
 {
     lock (_FrameUpdateItems)
         _FrameUpdateItems.Remove(item);
 }
Beispiel #3
0
 public void UnregisterForFrameUpdates(IFrameUpdate item)
 {
     lock (_FrameUpdateItems)
         _FrameUpdateItems.Remove(item);
 }
Beispiel #4
0
 public void RegisterForFrameUpdates(IFrameUpdate item)
 {
     lock (_FrameUpdateItems)
         _FrameUpdateItems.AddLast(item);
 }
Beispiel #5
0
 public void RemoveFrame(IFrameUpdate frame)
 {
     _list.Remove(frame);
 }
Beispiel #6
0
 public void RegisterForFrameUpdates(IFrameUpdate item)
 {
     lock (_FrameUpdateItems)
         _FrameUpdateItems.AddLast(item);
 }
Beispiel #7
0
 public void AddFrame(IFrameUpdate frame)
 {
     _list.Add(frame);
 }
Beispiel #8
0
 private int UpdatedScore(IFrameUpdate frameUpdateType) => _score + frameUpdateType.Score(_pinsDown, _pinsIndex);
Beispiel #9
0
 private int UpdatedIndex(IFrameUpdate frameUpdateType) => _pinsIndex + frameUpdateType.Adjustment();
Beispiel #10
0
 private FrameState UpdatedFrameState(IFrameUpdate frameUpdate) => new FrameState(_pinsDown, UpdatedScore(frameUpdate), UpdatedIndex(frameUpdate));
Beispiel #11
0
 private void UpdateFrame(IFrameUpdate frameUpdate, float delteTime)
 {
     frameUpdate.FrameUpdate(delteTime);
 }