Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     spray = GetComponentInChildren <PainterScript>();
     if (!startWithSpray)
     {
         spray.setUnactive();
     }
 }
Exemplo n.º 2
0
    // Use this for initialization
    private void Start()
    {
        _MeshRenderer       = GetComponent <MeshRenderer>();
        _Animator           = GetComponent <Animator>();
        _PlayerMeshRenderer = transform.parent.gameObject.GetComponent <MeshRenderer>();

        _PlayerPainter = GetComponentInParent <PainterScript>();

        _PlayerPainter.OnColorChanged += UpdateColorInfo;
        ColorChecker.GetComponent <ColorDetectorScript>().OnAbsorbablesChanged += UpdateDetectedColor;
    }
Exemplo n.º 3
0
    void Awake()
    {
        if (Instance != null)
        {
            Debug.LogError("More than one Painter has been instanciated in this scene!");
        }
        Instance = this;

        if (PaintPrefab == null)
        {
            Debug.LogError("Missing Paint decal prefab!");
        }
    }
Exemplo n.º 4
0
    void Start()
    {
        if (Instance != null)
        {
            Debug.LogError("More than one Painter has been instanciated in this scene!");
        }
        Instance = this;

        if (PaintPrefab == null)
        {
            Debug.LogError("Missing Paint decal prefab!");
        }
        mouseLook       = GetComponentInParent <MouseLook>();
        slider.maxValue = maxCapacity;
        slider.value    = capacity;
    }
Exemplo n.º 5
0
 void Start()
 {
     S = this;
     resetPos = transform.position;
     rb = gameObject.GetComponent<Rigidbody>();
     source = GetComponent<AudioSource> ();
     var inputDevice = InputManager.ActiveDevice;
 }