Exemple #1
0
    // Use this for initialization
    void Start()
    {
        isEnabled = true;
        mySR      = player.GetComponent <stationaryCharacter>();

        //Setting transparency to the player preferences' transparency.
        Image material = GetComponent <Image>();

        material.color = new Color(material.color.r, material.color.g, material.color.b, globalDataPreserver.Instance.getButtonOpacity() / 255);
        Text buttonText = GetComponentInChildren <Text>();

        buttonText.color = new Color(buttonText.color.r, buttonText.color.g, buttonText.color.b, material.color.a);
    }
Exemple #2
0
 // Use this for setting the portal up.
 public void Start()
 {
     rb     = player.GetComponent <Rigidbody2D>();
     mySC   = player.GetComponent <stationaryCharacter>();
     myAnim = player.GetComponent <Animator>();
 }