示例#1
0
    public void AssignDroneToPlayer(GameObject _drone)
    {
        drone = _drone;

        shootingScript  = drone.GetComponent <Shooting>();
        flightScript    = drone.GetComponent <flight>();
        rayViewerScript = drone.GetComponent <RayViewer>();
    }
示例#2
0
    void Start()
    {
        this._ray_viewer = this.GetComponent <RayViewer> ();
        this._my_render  = this.GetComponent <MeshRenderer> ();
        var mats = GetComponent <Renderer>().materials;

        mats[1] = _off_material;
        GetComponent <Renderer>().materials = mats;
    }