void Start()
 {
     ps = GetComponent <ParticleSystemRenderer>();
     if (bottleSmash == null)
     {
         bottleSmash = GetComponentInParent <BottleSmash>();
     }
     RegisterWithController();
 }
Beispiel #2
0
 void Start()
 {
     //mat = GetComponent<MeshRenderer>();
     lva = GetComponent <LiquidVolumeAnimator>();
     if (bottleSmash == null)
     {
         bottleSmash = GetComponentInParent <BottleSmash>();
     }
     RegisterWithController();
 }
Beispiel #3
0
    void Start()
    {
        _smash             = GetComponent <BottleSmash>();
        _ghost             = Instantiate(_ghostObject).transform;
        _ghost.position    = transform.position;
        _ghost.rotation    = transform.rotation;
        _ghost.localScale  = _smash.Glass.transform.localScale;
        _externalTransform = _ghost;
        MeshCollider mc = _ghost.gameObject.GetComponent <MeshCollider>();

        mc.sharedMesh = _smash.Glass.GetComponent <MeshFilter>().sharedMesh;

        _ghost.GetComponent <ConveyImpacts>()._physics = this;
    }
Beispiel #4
0
 void Start()
 {
     BS = GetComponent <BottleSmash>();
 }