//public AbilityHyperDash abilityHyperDash; // Use this for initialization void Start() { //Physics.gravity = new Vector3 (0, 0, -9.81f); anim = GetComponent <Animator> (); basicMovement = GetComponent <AbilityBasicMovement> (); attackAbility = GetComponent <AttackAbility> (); shieldAbility = GetComponent <AbilityShield> (); dodgeAbility = GetComponent <AbilityDodgeRoll> (); sprintAttackAbility = GetComponent <AbilitySprintAttack> (); chargedAttackAbility = GetComponent <AbilityChargedAttack> (); warpStrikeAbility = GetComponent <AbilityWarpStrike>(); grabAbility = GetComponent <AbilityGrab> (); flinchState = GetComponent <PlayerStateFlinch> (); fallState = GetComponent <AbilityFall> (); interactState = GetComponent <AbilityInteract> (); dialogueState = GetComponent <AbilityDialogue> (); hurtInfo = GetComponent <HurtInfoReceiver> (); playerHealthComponent = GetComponent <PlayerHealthComponent>(); //abilityHyperDash = GetComponent<AbilityHyperDash> (); //If Player doesn't exist yet if (!playerExists) { playerExists = true; DontDestroyOnLoad(transform.gameObject); } else { Destroy(gameObject); } //Starting state for player playerState = PlayerState.Default; }
// Use this for initialization void Start() { GameObject player = GameObject.Find("Player"); this.playerMovementSystem = player.GetComponent <AbilityBasicMovement>(); this.keyInventory = player.GetComponent <PlayerKeyInventory>(); this.spriteRenderer = GetComponent <SpriteRenderer>(); this.PromptUI.SetActive(false); this.isActive = true; }
// Use this for initialization void Start() { playerBody = GetComponent <Rigidbody2D> (); playerAnimator = GetComponent <Animator> (); grabCollider = GameObject.Find("Grab Collider Up").GetComponent <CircleCollider2D> (); grabCollider.enabled = false; grabState = GrabState.Setup; enemyGrabbed = false; playerAttackInfo = GetComponent <AttackInfoContainer> (); orientationSystem = GetComponent <OrientationSystem> (); moveInfo = GetComponent <AbilityBasicMovement> (); }
// Use this for initialization void Start() { //playerInfo = GetComponent<PlayerInfoContainer> (); movementInfo = GetComponent <AbilityBasicMovement> (); playerAttackInfo = GetComponent <AttackInfoContainer> (); swordCollider = GameObject.Find("Sword Collider Down").GetComponent <SwordCollider> (); //Down swordColliderUp = GameObject.Find("Sword Collider Up").GetComponent <SwordCollider> (); swordColliderLeft = GameObject.Find("Sword Collider Left").GetComponent <SwordCollider> (); swordColliderRight = GameObject.Find("Sword Collider Right").GetComponent <SwordCollider> (); playerBody = GetComponent <Rigidbody2D> (); DirectionHandler = new FourDirectionSystem(); playerAnimator = GetComponent <Animator> (); }
// Use this for initialization void Start() { this.state = InteractState.Check; this.animator = GetComponent <Animator>(); this.playerMovementSystem = GetComponent <AbilityBasicMovement>(); this.playerDialogueState = GameObject.Find("Player").GetComponent <AbilityDialogue>(); this.DirectionSystem = new FourDirectionSystem(); this.holdItem.enabled = false; this.HPHandler = GetComponent <PlayerHealthComponent>(); this.SPHandler = GetComponent <PlayerSPComponent>(); this.KeyInventory = GetComponent <PlayerKeyInventory>(); }
// Use this for initialization void Start() { //swordCollider = GetComponent<Collider2D> (); attachedCollider = GetComponent <PolygonCollider2D> (); if (attachedCollider == null) { Debug.Log("MISSING COLLIDER REF"); } Debug.Log("GOT COLLIDER REF"); targetsHit = new List <int> (); moveInfo = GetComponentInParent <AbilityBasicMovement> (); playerAttackInfo = GetComponentInParent <AttackInfoContainer> (); SPManager = GetComponentInParent <PlayerSPComponent>(); SPValues = new PlayerSPValues(); timeManager = GameObject.Find("Time Manager").GetComponent <TimeFunctions> (); hitParticles = GameObject.Find("HitParticles"); DisableCollider(); }
// Use this for initialization void Start() { shieldState = ShieldState.Setup; playerMoving = false; moveDirection = Vector2.zero; playerBody = GetComponent <Rigidbody2D> (); animator = GetComponent <Animator> (); orientationSystem = GetComponent <OrientationSystem> (); moveInfo = GetComponent <AbilityBasicMovement> (); shieldColliderUp = GameObject.Find("Shield Collider Up").GetComponent <PolygonCollider2D> (); shieldColliderDown = GameObject.Find("Shield Collider Down").GetComponent <PolygonCollider2D> (); shieldColliderRight = GameObject.Find("Shield Collider Right").GetComponent <PolygonCollider2D> (); shieldColliderLeft = GameObject.Find("Shield Collider Left").GetComponent <PolygonCollider2D> (); shieldColliderUp.enabled = false; shieldColliderDown.enabled = false; shieldColliderRight.enabled = false; shieldColliderLeft.enabled = false; }
//NOTE: Will need to add additional collider references for sprint attacks // and for the chain attacks if they end up being different void Start() { playerAttackInfo = GetComponent <AttackInfoContainer>(); swordCollider = GameObject.Find("Sword Collider Down").GetComponent <SwordCollider>(); //Down swordColliderUp = GameObject.Find("Sword Collider Up").GetComponent <SwordCollider>(); if (swordColliderUp == null) { Debug.Log("NULL UP "); } swordColliderLeft = GameObject.Find("Sword Collider Left").GetComponent <SwordCollider>(); swordColliderRight = GameObject.Find("Sword Collider Right").GetComponent <SwordCollider>(); playerBody = GetComponent <Rigidbody2D>(); //orientationSystem = GetComponent<OrientationSystem>(); DirectionHandler = new FourDirectionSystem(); playerAnimator = GetComponent <Animator>(); movementInfo = GetComponent <AbilityBasicMovement>(); comboCount = 0; bufferInput = false; chargeAttack = false; }
// Use this for initialization void Start() { playerAttackInfo = GetComponent <AttackInfoContainer> (); //playerOrientation = GetComponent<PlayerOrientation> (); movementInfo = GetComponent <AbilityBasicMovement> (); playerBody = GetComponent <Rigidbody2D> (); spriteRenderer = GetComponent <SpriteRenderer> (); animator = GetComponent <Animator> (); //orientationSystem = GetComponent<OrientationSystem> (); DirectionHandler = new FourDirectionSystem(); chargeAttackState = ChargeAttackState.Setup; colliderUp = GameObject.Find("cAttack Collider Up").GetComponent <SwordCollider> (); colliderDown = GameObject.Find("cAttack Collider Down").GetComponent <SwordCollider> (); colliderLeft = GameObject.Find("cAttack Collider Left").GetComponent <SwordCollider> (); colliderRight = GameObject.Find("cAttack Collider Right").GetComponent <SwordCollider> (); colliderUp.DisableCollider(); colliderDown.DisableCollider(); colliderRight.DisableCollider(); colliderLeft.DisableCollider(); }