void Start() { Application.targetFrameRate = 60; airID = Animator.StringToHash("Airborne"); standID = Animator.StringToHash("Standing"); crouchID = Animator.StringToHash("Crouch"); dizzyID = Animator.StringToHash("Dizzy"); lowGuardID = Animator.StringToHash("LowGuard"); highGuardID = Animator.StringToHash("HighGuard"); airGuardID = Animator.StringToHash("AirGuard"); runID = Animator.StringToHash("Run"); landLagID = Animator.StringToHash("LandingLag"); zPos = transform.position.z; sprite = GetComponent <SpriteRenderer>(); opponentMove = Move.opponent.GetComponent <MovementHandler>(); MaxInput = GameObject.Find("MaxInput").GetComponent <MaxInput>(); }
public void PlayGameVsAI() { GameObject.Find("TransitionCanvas").transform.GetComponentInChildren <SceneTransitions>().LoadScene(1); MaxInput.enableAI(); }
void Start() { MaxInput = GetComponent <MaxInput>(); }
// Registering the values' initial states void Start() { // Player data pIsBlocking = false; pIsAirborne = false; pIsCrouching = false; pIsAttacking = false; pIsActive = false; pIsRecovering = false; pIsHitstun = false; pIsBlockstun = false; pIsSupering = false; pAttackingGuard = ""; pCharacter = ""; pGuard = ""; // AI data faceLeft = true; isAirborne = false; //isCrouching = false; isAttacking = false; isRecovering = false; isHitstun = false; //finishMove = false; //finishDash = false; pauseAI = false; keepInput = false; keepAction = ""; aiCharacter = ""; // Command inputs doingQCF = 0; doingQCB = 0; doingHCF = 0; doingHCB = 0; doingDP = 0; // Combos doing5L_1 = 0; doing2H_1 = 0; // Distance between players distanceBetweenX = 0; distanceBetweenY = 0; // Timers pastryTimer = 0; circleTimer = 0; squareTimer = 0; triangleTimer = 0; crossTimer = 0; breakTimer = 0; noBreakTimer = 0; delayTimer = 0; MaxInput = GetComponent <MaxInput>(); if (!MaxInput.AI) { //Debug.Log("AI disabled"); enabled = false; } PlayerProp = GameObject.Find("Player1").transform.GetComponentInChildren <CharacterProperties>(); AIProp = GameObject.Find("Player2").transform.GetComponentInChildren <CharacterProperties>(); playerInput = GameObject.Find("Player1").transform.GetChild(0).GetChild(0).gameObject; playerHit = GameObject.Find("Player1").transform.GetChild(0).GetChild(2).gameObject; aiInput = GameObject.Find("Player2").transform.GetChild(0).GetChild(0).gameObject; aiHit = GameObject.Find("Player2").transform.GetChild(0).GetChild(2).gameObject; characterManager = GameObject.Find("PlayerData").GetComponent <SelectedCharacterManager>(); states.Add("Attack", 0); states.Add("Defend", 0); states.Add("Approach", 0); states.Add("Recover", 0); attackStates.Add("Zone", 0); attackStates.Add("Overhead", 0); attackStates.Add("Mid", 0); attackStates.Add("Low", 0); attackStates.Add("Grab", 0); attackStates.Add("Setup", 0); // Figure out how to see if the player is down on the floor }