private void Awake() { if (playerNumberTag) { playerNumberTag.text = playerNumber.ToString(); } //powerupParticle.Stop(); isFrozen = false; isShrunken = false; thrusterSpeed = defaultThrusterSpeed; defaultMass = rigid.mass; killList = new List <PlayerController>(); rigid.gravityScale = 0; rightStickHorz = 1; rightStickVert = 0; shield = GetComponentInChildren <Shield>(); animator = transform.GetComponentInChildren <Animator>(); team = gameData.GetPlayerTeam(playerNumber - 1); chosenCharacter = gameData.GetPlayerCharacter(playerNumber - 1); shield.SetTeamColor(team); acceptingInput = true; dashController = GetComponent <PlayerDashController>(); if (gameManagerInstance != null || GameManager.TryGetInstance(out gameManagerInstance)) { gameManagerInstance.LoadPlayer(this, playerNumber); } }
public void SpawnDashParticles() { dashSoundFx.Play(); PlayerDashController dash = rsc.coloredObjectsMng.GetPlayerDash(); dash.transform.position = transform.position; dash.transform.rotation = bb.dashPSRotator.rotation; }
public PlayerController(PlayerModel model) { _playerModel = model; movementController = new PlayerMovementController(); abilitiesController = new PlayerAbilitiesController(_playerModel.GetAimSensitivity(), _playerModel.GetAimPointer(), model); dashController = new PlayerDashController(); EventsManager.TriggerEvent("SuscribeToUpdateManager", this); }
protected override void Start() { base.Start(); this.playerWeaponController = GetComponent <PlayerWeaponController>(); this.playerDashController = GetComponent <PlayerDashController>(); this.hudManager = HUDManager.instance; this.anim.SetFloat("Move", 0.5f); }
public void Awake() { dashController = GetComponentInParent <PlayerDashController>(); fuelBubbles = new List <SpriteRenderer>(); pc = GetComponentInParent <PlayerController>(); }