private void Awake() { input = GetComponent <PlayerInputCustom>(); movement = GetComponent <PlayerMovement>(); dash = GetComponent <PlayerDash>(); stats = GetComponent <PlayerStats>(); }
//bool fatigue = false; //bool canDash = true; // Use this for initialization void Start () { anim = GetComponent <Animator> (); currentStamina = startingStamina; playerAudio = GetComponent <AudioSource> (); playerDash = GetComponent<PlayerDash>(); }
private void Awake() { //filename = chosen file name from GameTracker class. gameTracker = FindObjectOfType <GameTracker>(); if (gameTracker) { fileName = gameTracker.ChosenFileName; } else { fileName = "DemonHunterSave1.Json"; } filePath = Application.persistentDataPath + "/" + fileName; _playerController = FindObjectOfType <PlayerController>(); _playerCamera = FindObjectOfType <PlayerCamera>(); _tutorialManager = FindObjectOfType <TutorialManager>(); _playerEnergyPoints = FindObjectOfType <PlayerEnergyPoints>(); _playerMeleeAttack = FindObjectOfType <PlayerMeleeAttack>(); _playerShoot = FindObjectOfType <PlayerShoot>(); _playerDash = FindObjectOfType <PlayerDash>(); _playerEnergy = FindObjectOfType <PlayerEnergy>(); _gameManager = FindObjectOfType <GameManager>(); _playerUpgradesManager = FindObjectOfType <PlayerUpgradesManager>(); _npcManager = FindObjectOfType <NPCManager>(); }
void Start() { particle = GetComponent <ParticleSystem>(); PlayerDash dash = GetComponentInParent <PlayerDash>(); dash.OnDash += onDash; }
// Start is called before the first frame update void Start() { dashController = GetComponent <PlayerDash>(); controlsController = GetComponent <PlayerController>(); rb = GetComponent <Rigidbody2D>(); playerSprite = GetComponent <SpriteRenderer>(); }
//bool fatigue = false; //bool canDash = true; // Use this for initialization void Start() { anim = GetComponent <Animator> (); currentStamina = startingStamina; playerAudio = GetComponent <AudioSource> (); playerDash = GetComponent <PlayerDash>(); }
private void Start() { this.playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController> (); this.particles = GetComponent <ParticleSystem> (); this.dashingLayer = LayerMask.NameToLayer("Dashing"); this.playerDash = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerDash> (); }
private void Awake() { cam = GetComponent <CinemachineVirtualCamera>(); shake = cam.GetCinemachineComponent <CinemachineBasicMultiChannelPerlin>(); dash = FindObjectOfType <PlayerDash>(); fire = FindObjectOfType <PlayerFire>(); }
//Cache currently used scripts to access as components private void Awake() { _movement = GetComponent <PlayerMovement>(); _jumping = GetComponent <PlayerJump>(); _dash = GetComponent <PlayerDash>(); _attack = GetComponent <PlayerAttack>(); }
public PlayerDashRobot() { motionConstants = new PlayerMotionConstants(); playerEffects = Substitute.For <IPlayerEffects>(); playerDash = new PlayerDash(motionConstants, playerEffects); }
private void Awake() { _tutorialManager = FindObjectOfType <TutorialManager>(); _playerMeleeAttack = FindObjectOfType <PlayerMeleeAttack>(); _playerShoot = FindObjectOfType <PlayerShoot>(); _playerDash = FindObjectOfType <PlayerDash>(); }
private void Awake() { movement = GetComponent <PlayerMovement>(); animations = GetComponent <PlayerAnimations>(); dash = GetComponent <PlayerDash>(); fire = GetComponent <PlayerFire>(); stats = GetComponent <PlayerStats>(); }
void Start() { allowInput = true; lightAttackClass = GetComponent <LightAttack>(); mediumAttackClass = GetComponent <MediumAttack>(); heavyAttackClass = GetComponent <HeavyAttack>(); playerDefenseClass = GetComponent <PlayerDefense>(); playerDashClass = GetComponent <PlayerDash>(); }
// Use this for initialization void Start() { dash = GetComponent <PlayerDash>(); Agent = GetComponent <NavMeshAgent>(); Anim = GetComponentInChildren <Animator>(); Anim.SetFloat("Speed_f", 0f); Marker.transform.position = transform.position; previousPosition = transform.position; }
void Start() { gm = FindObjectOfType <GameManager>(); rb = GetComponent <Rigidbody2D>(); playerDash = GetComponent <PlayerDash>(); animator = GetComponent <Animator>(); currentMoveSpeed = moveSpeed; currentTimedStep = 0; }
void Awake() { input = GetComponent <PlayerInput>(); bodyMovement = GetComponent <BodyMovement>(); dash = GetComponent <PlayerDash>(); rayMask = shieldLayerMask | wallLayerMask; comparer = new RaycastHitAscendingDistanceComparer(); }
//Cache currently used scripts to access as components private void Awake() { _movement = GetComponent <PlayerMovement>(); _jumping = GetComponent <PlayerJump>(); _slideJump = GetComponent <PlayerWallJump>(); _dash = GetComponent <PlayerDash>(); _attack = GetComponent <PlayerAttack>(); _groundPound = GetComponent <PlayerGroundPound>(); _paintBomb = GetComponent <PlayerPaintBomb>(); }
private void Awake() { _tutorialManager = FindObjectOfType <TutorialManager>(); _playerController = FindObjectOfType <PlayerController>(); _playerMeleeAttack = FindObjectOfType <PlayerMeleeAttack>(); _playerDash = FindObjectOfType <PlayerDash>(); _playerShoot = FindObjectOfType <PlayerShoot>(); _jsonDataManager = FindObjectOfType <JsonDataManager>(); uiManager = FindObjectOfType <UIManager>(); }
// Start is called before the first frame update private void Start() { PlayerDash = GameObject.Find("Player").GetComponent <DashMovement>(); var profile = GetComponent <Volume>().profile; profile.TryGet(out chroma); profile.TryGet(out panini); PlayerDash.Subscribe(DashState.Dashing, StateCallBack.OnStateEnter, () => StartCoroutine(Effect())); }
// Start is called before the first frame update void Start() { Player = GameObject.FindGameObjectWithTag("Player"); shootAttack = Player.GetComponent <PlayerShoot>(); dash = Player.GetComponent <PlayerDash>(); jump = Player.GetComponent <PlayerJump>(); coelho = GameObject.FindGameObjectWithTag("coelho"); coruja = GameObject.FindGameObjectWithTag("coruja"); raposa = GameObject.FindGameObjectWithTag("raposa"); }
new void Awake() { base.Awake(); Instance = this; animator = GetComponent <Animator>(); dash = GetComponent <PlayerDash>(); potsHandler = GetComponent <PlayerPots>(); holeSensor = this.GetComponentInChildren <HoleSensorController>(); potSensor = this.GetComponentInChildren <PotSensor>(); potSensorDistance = potSensor.transform.localPosition.magnitude; }
private void Start() { JumpKey = InputHandler.jump_key; OnWall = false; isDashing = false; rb = GetComponent <Rigidbody2D>(); pm = GetComponent <PlayerMovement>(); wallMask = pm.groundMask; if (GetComponent <PlayerDash>() != null) { pd = GetComponent <PlayerDash>(); } }
private void Awake() { playerController = GetComponent <PlayerController>(); playerShoot = GetComponent <PlayerShoot>(); healthComponent = GetComponent <HealthComponent>(); playerEnergy = GetComponent <PlayerEnergy>(); playerDash = GetComponent <PlayerDash>(); playerMeleeAttack = GetComponent <PlayerMeleeAttack>(); playerAbilities = GetComponent <PlayerAbilities>(); npcManager = FindObjectOfType <NPCManager>(); uiManager = FindObjectOfType <UIManager>(); gameManager = FindObjectOfType <GameManager>(); }
/// <summary> /// This handles damage to the player /// </summary> /// <param name="dash">Reference to tell if the player is currently dashing or not</param> private IEnumerator DelayDamage(PlayerDash dash) { if (!dash.inDash) { PlayerHealth.singleton.takeDamage(); yield return(new WaitForSeconds(damageDelay)); } damageRoutine = null; yield return(null); }
void Start() { anim = GetComponent <Animator>(); rb = GetComponent <Rigidbody2D>(); playerLife = GetComponent <PlayerLife>(); playerRun = GetComponent <PlayerRun>(); playerDash = GetComponent <PlayerDash>(); playerJump = GetComponent <PlayerJump>(); playerShoot = GetComponent <PlayerShoot>(); playerHit = GetComponent <PlayerHit>(); isFacingRight = true; savedGravityScale = rb.gravityScale; }
void Awake() { charController = GetComponent <CharacterController>(); playerModel = GetComponent <PlayerModel>(); playerDash = GetComponent <PlayerDash>(); HelperUtilities.UpdateCursorLock(true); movementVector = Vector3.zero; charController.detectCollisions = true; initialSpeed = speed; maxHazardEffectDuration = hazardEffectDuration; }
private void Awake() { rb = this.GetComponent <Rigidbody>(); movement = this.GetComponent <PlayerMovement>(); aim = this.GetComponent <PlayerAim>(); aimUI = this.GetComponentInChildren <PlayerAimUI>(); attack = this.GetComponent <PlayerAttack>(); dash = this.GetComponent <PlayerDash>(); ability = this.GetComponent <PlayerAbility>(); input = this.gameObject.AddComponent <ControllerInput>(); Debug.Log(playerNum); input.OnAwake(playerNum); }
private void Awake() { animator = GetComponent <Animator>(); rb = GetComponent <Rigidbody2D>(); playerController = GetComponent <PlayerController>(); playerMovement = GetComponent <PlayerMovement>(); playerDash = GetComponent <PlayerDash>(); playerAttack = GetComponent <PlayerAttack>(); playerJump = GetComponent <PlayerJump>(); playerWallJump = GetComponent <PlayerWallJump>(); playerGroundPound = GetComponent <PlayerGroundPound>(); playerPaintBomb = GetComponent <PlayerPaintBomb>(); death = GetComponent <deathSystem>(); }
private void Awake() { walkController = player.GetComponent <PlayerWalk>(); dashController = player.GetComponent <PlayerDash>(); jumpController = player.GetComponent <PlayerJump>(); fireController = player.GetComponent <PlayerFire>(); thisTransform = gameObject.GetComponent <Transform>(); energy = player.GetComponent <EnergyController>(); playerBody = player.GetComponent <Rigidbody2D>(); sprite = GetComponent <SpriteRenderer>(); sounds = GetComponent <Sounds>(); }
private void Start() { rb = GetComponent <Rigidbody2D>(); anim = transform.Find("PlayerVisuals").GetComponent <Animator>(); playerStats = GetComponent <PlayerStats>(); playerRaycastsScr = GetComponent <PlayerRaycasts>(); playerJumpScr = GetComponent <PlayerJump>(); playerDashScr = GetComponent <PlayerDash>(); checkpointBaseScr = GameObject.Find("Manager_Checkpoints").GetComponent <CheckpointBase>(); playerState = GameObject.Find("Manager_PlayerState").GetComponent <PlayerState>(); fadeBlackScreenScr = GameObject.Find("HUD_BlackScreen").GetComponent <FadeBlackScreen>(); cameraControllerScr = GameObject.Find("Main Camera").GetComponent <CameraController2>(); StartCoroutine(FadeBlackScreenOut()); StartCoroutine(SetPlayerStartValues()); }
// Start is called before the first frame update void Start() { Direction = 1; gravityScale = NORMAL_GRAVITY; IsGrounded = true; CanRotate = true; rb = GetComponent <Rigidbody2D>(); if (GetComponent <PlayerDash>() != null) { pd = GetComponent <PlayerDash>(); } runApplyGravity = true; runHorizontalMovement = true; LeftKey = InputHandler.left_key; // Hard-coded keybinds. Remove later. RightKey = InputHandler.right_key; JumpKey = InputHandler.jump_key; }
void Start() { _anim = GetComponent<Animator>(); _combatScript = GetComponent<PlayerCombatScript>(); _fighterRef = this.gameObject.GetComponent<Fighter>(); _instance = this; _playerJump = this.gameObject.AddComponent<Jump>(); _playerJump.JumpSpeed = _jumpSpeed; _playerDash = this.gameObject.AddComponent<PlayerDash>(); }