Exemple #1
0
    void Start()
    {
        GameLogic = GameObject.FindGameObjectWithTag("GameLogic").GetComponent<GameLogic>();
        GameLogic.SetLivesText(playerNumber, lives);

        playerRigidbody = GetComponent<Rigidbody>();
        playerTransform = GetComponent<Transform>();
        playerCollider = GetComponent<Collider>();
        audioSource = GetComponent<AudioSource>();

        playerMode = mode.normal;
        playerCollider.material = physicMaterialNormal;
        playerSpeed = NORMAL_SPEED;
        effectSpeed = EFFECT_NORMAL;

        scaleNormal = new Vector3(NORMAL_SCALE, NORMAL_SCALE, NORMAL_SCALE);
        scaleBigger = new Vector3(BIGGER_SCALE, BIGGER_SCALE, BIGGER_SCALE);
        scaleFaster = new Vector3(FASTER_SCALE, FASTER_SCALE, FASTER_SCALE);
    }