public void Start() { frame = GameObject.FindGameObjectWithTag("rspTime").GetComponent <FrameEnforcer>(); frame.AddUpdate((int)FramePriority.InputBuffer, new Action <int>(ServeBuffer)); inputFactory = new Input.Factory(); inputBuffer = new GameInputStruct[bufferLength]; currState = new GameInputStruct { direction = FightingGameAbsInputCodeDir.Neutral, butA = false, butB = false, butC = false, butD = false, butS = false, }; for (int n = 0; n < inputBuffer.Length; ++n) { inputBuffer[n] = new GameInputStruct { direction = FightingGameAbsInputCodeDir.Neutral, butA = false, butB = false, butC = false, butD = false, butS = false, }; } inputCombinations = new List <Input.Combinations.Combination>(); }
public void Start() { frame = GameObject.FindGameObjectWithTag("rspTime").GetComponent <FrameEnforcer>(); frame.AddUpdate((int)FramePriority.Service, new System.Action <int>(FrameUpdate)); playerService = GetComponent <PlayerService>(); fgService = GetComponent <FightingGameService>(); persistenceService = GetComponent <PersistenceService>(); uiService = GetComponent <UiService>(); EventManager.TriggerEvent <Events.ServiceReady, Type>(typeof(FightingGameService)); }
public void Awake() { frame = GameObject.FindGameObjectWithTag("rspTime").GetComponent <FrameEnforcer>(); frame.AddUpdate((int)FramePriority.Gamemode, new Action <int>(FrameUpdate)); gameTimeManager = GameObject.FindGameObjectWithTag("rspTime").GetComponent <GameTimeManager>(); gameTimeManager.AddLayer(new Func <float, float>(GameTime), "gameTime"); EventManager.StartListening <Events.FrameEnforcerReady>(new UnityAction(EnablePlayers)); EventManager.StartListening <Events.StartGame>(new UnityAction(StartGame)); }
public void Awake() { inputCallbacks = new Dictionary <Type, Action <Action, Combination> >(); enterCallbacks = new Dictionary <Type, Action <Action, Combination> >(); inputRegistry = new CallbackRegistry(inputCallbacks); enterRegistry = new CallbackRegistry(enterCallbacks); stopInputSearch = new Action(StopInputSearch); states = gameObject.GetComponentInParent <StateDict>(); fgChar = gameObject.GetComponentInParent <FightingGameCharacter>(); frame = GameObject.FindGameObjectWithTag("rspTime").GetComponent <FrameEnforcer>(); }
public void Start() { frame = GameObject.FindGameObjectWithTag("rspTime").GetComponent <FrameEnforcer>(); frame.AddUpdate((int)FramePriority.Service, new System.Action <int>(FrameUpdate)); frame.AddUpdate((int)FramePriority.ActivePollingReset, new System.Action <int>(ResetActivePolling)); hitBoxMap = new Dictionary <int, HitBox>(); activeHitBoxes = new List <HitBox>(); previousActiveHitBoxes = new List <HitBox>(); EventManager.TriggerEvent <Events.ServiceReady, Type>(typeof(HitBoxService)); }
public void Start() { frame = GameObject.FindGameObjectWithTag("rspTime").GetComponent <FrameEnforcer>(); frame.AddUpdate((int)FramePriority.Service, new System.Action <int>(FrameUpdate)); frame.AddUpdate((int)FramePriority.ActivePollingReset, new System.Action <int>(ResetActivePolling)); projectilePrefabs = new Dictionary <int, GameObject>(); projectileMap = new Dictionary <int, ResourceRecycler <Projectile> >(); activeProjectiles = new List <Projectile>(); EventManager.TriggerEvent <Events.ServiceReady, Type>(typeof(ProjectileService)); }
public void Awake() { inputBuffer = GetComponent <InputBuffer>(); inputActions = new BasicActions(); inputActions.GamePlay.Move.performed += OnMove; inputActions.GamePlay.ButtonA.performed += OnButtonA; inputActions.GamePlay.ButtonB.performed += OnButtonB; inputActions.GamePlay.ButtonC.performed += OnButtonC; inputActions.GamePlay.ButtonD.performed += OnButtonD; inputActions.GamePlay.ButtonS.performed += OnButtonS; FrameEnforcer frame = GameObject.FindGameObjectWithTag("rspTime").GetComponent <FrameEnforcer>(); frame.AddUpdate((int)FramePriority.InputBuffer, new Action <int>(FrameUpdate)); }
public void Start() { frame = GameObject.FindGameObjectWithTag("rspTime").GetComponent <FrameEnforcer>(); frame.AddUpdate((int)FramePriority.Service, new System.Action <int>(FrameUpdate)); frame.AddUpdate((int)FramePriority.ActivePollingReset, new System.Action <int>(ResetActivePolling)); audioSources = new ResourceRecycler <AudioResource>(prefab, Vector3.zero, 4, audioEmpty, resource => { Debug.Log("callback called"); resource.SetService(this); resource.Deactivate(); }); // This works exactly as expected. //AudioSource test = GameObject.Instantiate<AudioSource>(prefab, new Vector3(-33, 0, 47), Quaternion.identity); //test.Play(); activeSounds = new List <AudioResource>(); previousActiveSounds = new List <AudioResource>(); activeOneShots = new List <AudioResource>(); EventManager.TriggerEvent <Events.ServiceReady, Type>(typeof(AudioService)); }
public void Awake() { fgChar = gameObject.GetComponentInParent <FightingGameCharacter>(); frame = GameObject.FindGameObjectWithTag("rspTime").GetComponent <FrameEnforcer>(); }
public void StartStateMachine(FrameEnforcer frame) { stateMachine.Enable(initState, frame); }
public void Start() { frame = gameObject.GetComponent <FrameEnforcer>(); frame.AddUpdate((int)FramePriority.UpdateInput, new Action <int>(ProcessEventsManually)); }