예제 #1
0
        void Start()
        {
            mover = GetComponent<WindsMover>();

            mover.NodesBuffer.Subscribe(nodesBuffer =>
            {
                material.SetBuffer(Consts.NODES, nodesBuffer);
            });
            mover.WindsBuffer.Subscribe(windsBuffer =>
            {
                material.SetBuffer(Consts.WINDS, windsBuffer);
            });

            material.SetInt(  "_NumNodesPerWind", mover.NumNodesPerWind);
            material.SetFloat("_NodeLife",        nodeLife);
            material.SetFloat("_WindWidth",       windWidth);

            tf = transform;
        }
예제 #2
0
 void Awake()
 {
     mover    = GetComponent <WindsMover>();
     renderer = GetComponent <WindsRenderer>();
 }