Пример #1
0
        void Start()
        {
            _railsController = GameObject.FindObjectOfType<RailsController>();
            _mesh = this.GetComponent<MeshFilter>().mesh;

            originalUVs = _mesh.uv;
            finalUVs = new Vector2[originalUVs.Length];

            for (int i = 0; i < finalUVs.Length; i++)
            {
                finalUVs[i] = originalUVs[i] + finalColorOffset;
            }

            secondToThird = thirdColorOffset - secondColorOffset;
        }
Пример #2
0
 public virtual void nodeStart()
 {
     this.id = _railsnode_id_++;
     parent = GameObject.FindObjectOfType<RailsController>();
     this.globalSpeed = parent.globalSpeed;
     if (!mover) mover = parent.gameObject;
 }