Ejemplo n.º 1
0
    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);
        }
    }
Ejemplo n.º 2
0
    public void SpawnDashParticles()
    {
        dashSoundFx.Play();
        PlayerDashController dash = rsc.coloredObjectsMng.GetPlayerDash();

        dash.transform.position = transform.position;
        dash.transform.rotation = bb.dashPSRotator.rotation;
    }
Ejemplo n.º 3
0
 public PlayerController(PlayerModel model)
 {
     _playerModel        = model;
     movementController  = new PlayerMovementController();
     abilitiesController = new PlayerAbilitiesController(_playerModel.GetAimSensitivity(), _playerModel.GetAimPointer(), model);
     dashController      = new PlayerDashController();
     EventsManager.TriggerEvent("SuscribeToUpdateManager", this);
 }
Ejemplo n.º 4
0
    protected override void Start()
    {
        base.Start();

        this.playerWeaponController = GetComponent <PlayerWeaponController>();
        this.playerDashController   = GetComponent <PlayerDashController>();
        this.hudManager             = HUDManager.instance;

        this.anim.SetFloat("Move", 0.5f);
    }
Ejemplo n.º 5
0
 public void Awake()
 {
     dashController = GetComponentInParent <PlayerDashController>();
     fuelBubbles    = new List <SpriteRenderer>();
     pc             = GetComponentInParent <PlayerController>();
 }