Ejemplo n.º 1
0
 private void Awake()
 {
     fixzilla              = FindObjectOfType <Fixzilla>();
     fixzilla.TooFast     += PrepareEarthquake;
     fixzilla.NormalSpeed += StopEarthQuake;
     fixzilla.GetComponent <JumpingObject>().Landed += OnEarthQuake;
     audioSource             = gameObject.AddComponent <AudioSource>();
     cooldownTimer           = cooldown;
     audioSourceMultichannel = GetComponent <AudioSourceMultichannel>();
     foreach (var crowd in crowds)
     {
         crowd.gameObject.SetActive(false);
     }
     activeCrowds  = 0;
     rewiredPlayer = ReInput.players.GetPlayer(playerId);
 }
Ejemplo n.º 2
0
 private void Awake()
 {
     rigidbody2D = GetComponent <Rigidbody2D>();
     if (isPlaced)
     {
         rigidbody2D.mass = 1000;
     }
     breakingSprite.enabled  = false;
     brokenSprite.enabled    = false;
     highlightSprite.enabled = false;
     brokeEffect.SetActive(true);
     health = maxHealth;
     //sprite.color = healthColorGradient.Evaluate(health / maxHealth);
     audioSourceMultichannel = GetComponent <AudioSourceMultichannel>();
     previousPosition        = transform.position;
     currentPosition         = transform.position;
 }
Ejemplo n.º 3
0
    private void Awake()
    {
        rigidbody2D = GetComponent <Rigidbody2D>();
        leftHandDefaultTransform  = leftHand.transform;
        rightHandDefaultTransform = rightHand.transform;

        leftHandDefaultOffset     = leftHand.transform.localPosition;
        rightHandDefaultOffset    = rightHand.transform.localPosition;
        armsDefaultPosition       = armsContainer.transform.localPosition;
        leftHandCustomRestOffset  = leftHandDefaultOffset;
        rightHandCustomRestOffset = rightHandDefaultOffset;
        arms = armsContainer.GetComponent <Arms>();
        globalPiecesController = FindObjectOfType <GlobalPiecesController>();
        spriteContainer.transform.localScale = Vector3.one;
        rewiredPlayer           = ReInput.players.GetPlayer(playerId);
        jumpingObject           = GetComponent <JumpingObject>();
        audioSourceMultichannel = GetComponent <AudioSourceMultichannel>();
    }
Ejemplo n.º 4
0
 private void Awake()
 {
     rigidbody2D             = GetComponent <Rigidbody2D>();
     audioSourceMultichannel = GetComponent <AudioSourceMultichannel>();
 }